body {
    background: #FBFCFD;
}

.layui-card {
    background: #FBFCFD;
}

.layui-layer-title {
    border-radius: 0 !important;
}

.warning-bg{
    background: #FF5722 !important;
}

.tdt-bottom,
.tdt-top {
    display: none !important;
}

.no-padding {
    padding: 0 !important;
}

.layui-fluid {
    padding: 10px;
}

.layui-card {
    border-radius: 0
}

.layui-card-body {
    padding: 10px 5px;
}

.layui-tab-title li {
    min-width: 60px;
}

/* ===== 应用页布局系统（app-page）：页面永不滚动，树/表格内部滚动 =====
   框架层高度链由 .app-mode 类触发（app-page 页面的 JS 在内容区上加类、离开时移除，
   兼容所有浏览器——此前用 :has 选择器在不支持的浏览器上整体失效）。
   原理：整条容器链 overflow hidden + 100% 高度，页面内部全用 flex 分配空间，
   滚动只发生在 .tree / 表格体等明确区域——零 JS 高度计算。 */
.layui-body.app-mode {
    overflow: hidden;
    padding-bottom: 0;                 /* 去掉 layui 预留的 44px */
}

.layui-body.app-mode > .layui-tab {
    height: 100%;
}

/* 注意必须用 > 直接子级链：框架层高度链只作用于顶层 tab 结构；
   若用后代选择器会误伤页面内部(如设备树自己的 tab 容器)，导致树列缺 42px 高度 */
.layui-body.app-mode > .layui-tab > .layui-tab-content {
    height: calc(100% - 42px);         /* 减去标签标题栏 */
    padding: 0;
}

.layui-body.app-mode > .layui-tab > .layui-tab-content > .layui-tab-item.layui-show {
    height: 100%;
}

.layui-body.app-mode > .layui-tab > .layui-tab-content > .layui-tab-item > div[lay-id] {
    height: 100%;
}

.app-page {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 9px 10px 2px;           /* 底部留白约2px，表格近乎贴底; 顶9px */
    box-sizing: border-box;
    overflow: hidden;
}

.app-main {
    flex: 1;
    display: flex;
    gap: 9px;
    min-height: 0;                     /* flex 滚动关键 */
}

/* pic页(栅格布局)的设备弹层锚点: 只借定位不做布局, 不能用.app-tree(固定270px会塌) */
.pic-tree { position: relative; }

.app-tree {
    width: 270px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    position: relative;                /* 设备弹层锚点 */
}

.app-tree .layui-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin-bottom: 0;                 /* 去掉 layui 卡片默认 15px 下边距，底边与表格卡对齐 */
}

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

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

.app-tree .layui-tab-content {
    flex: 1;
    min-height: 0;
    display: flex;                    /* 必须是 flex 容器：子级 tab 页的 flex:1 才生效，高度链才不断 */
    flex-direction: column;
}

.app-tree .layui-tab-item.layui-show {
    display: flex !important;         /* layui 的 .layui-show 是 display:block!important，必须同权重覆盖 */
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.app-tree .tree {
    flex: 1;
    min-height: 0;                     /* 树自动填满剩余高度，内部滚动 */
}

.app-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    /* 不设 gap：工具栏卡与表格卡紧贴（同 system/admin 的观感） */
}

.app-toolbar {
    flex-shrink: 0;
    margin-bottom: 9px;               /* 与横向间隙一致的纵向间隙 */
}

/* 工具栏禁止折行：换行会让查询/添加组掉到第二行(实测-710px的负间隙) */
.app-toolbar .layui-inline.pad15 {
    white-space: nowrap;
}

.app-toolbar .layui-btn-group {
    margin-right: 5px;                /* 组间/组与输入框间隙=5+空隙4≈9px, 与标签间隙一致 */
    margin-left: 0;                   /* 归零layui对相邻按钮组自带的10px左外边距 */
}

.app-toolbar .layui-input-inline {
    margin-right: 5px;                /* 同上≈9px */
    margin-left: 0;
    width: 160px;                     /* 日期文本左~10px右~10px, 替代默认190px的右侧大空白 */
}

/* 日期分隔符—：与两侧输入框等距(右距5px+空隙4px, 左侧由输入框右距5px+空隙4px对称) */
.date-sep {
    margin-right: 5px;
}

/* 左侧对齐：工具栏第一个按钮 与 表格卡头部第一个徽章 对齐（实测按钮529/徽章534，补5px） */
.app-toolbar .layui-inline.pad15 {
    padding-left: 10px;
}

.app-table-wrap .layui-card-header {
    padding-left: 10px;
}

.app-table-wrap .layui-card-header .layui-badge {
    margin-left: 0 !important;        /* 归零窄屏媒体查询里带的2px左外边距 */
}

.app-table-wrap {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* 列数少的统计表(count页)：与工具栏卡同宽占满内容区(work页同款), 列宽按比例拉伸、等宽关系不变 */

.app-table-wrap .layui-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin-bottom: 0;                 /* 同上，底边对齐 */
}

.app-table-wrap .layui-card-body {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
/* 通用：app-content 独子卡纵向弹性(工具栏+表格同卡的页面) */
.app-content > .layui-card:only-child {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.app-content > .layui-card:only-child > .layui-card-body {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.app-content > .layui-card + .layui-card {
    margin-top: 9px;                  /* version 等双卡页: 信息卡与表卡间距 */
}

/* 响应式：<1200 树窄一点；<768 上下堆叠 */
@media (max-width: 1200px) {
    .app-tree {
        width: 230px;
    }
}

@media (max-width: 768px) {
    .app-main {
        flex-direction: column;
    }

    .app-tree {
        width: auto;
        max-height: 40vh;
    }
}

.tree {
    overflow: auto;
    overflow-y: scroll;
    padding-top: 5px;
}

/* dtree 组件默认写死 width:260px，树不跟随列宽——改为填满容器 */
.dtree {
    width: 100% !important;
    box-sizing: border-box;
}

.dtree-nav-div:hover cite {
    opacity: 1;
    color: #fff !important;
}

.dtree-theme-choose {
    color: #39B55A !important;
}

.theme-blue .dtree-theme-choose {
    color: #458BE3 !important;
}

.dtree-theme-item:hover {
    background: linear-gradient(to right, #39B55A, #80C63E) !important;
}

.tree-refresh {
    padding: 10px 10px 0 10px;
}

.tree-search {
    padding-top: 10px;
    padding-left: 15px;
}

.search-terminal-div {
    padding: 5px 0 5px 0;
}

.search-name-input,
.search-terminal-input {
    height: 22px !important;
}

.search-name-input::-webkit-input-placeholder,
.search-terminal-input::-webkit-input-placeholder {
    font-size: 12px;
}

.layui-badge-coffee {
    color: #F3935B;
    background: #FFF3EE;
    border: 1px solid #E19D84;
}

.layui-badge-green1 {
    color: #009966;
    background: #ecf8f0;
    border: 1px solid #009966;
}

.layui-bg-green1 {
    background-color: #5FB878 !important;
}

.layui-bg-green2 {
    background-color: #009999 !important;
}

.layui-bg-green3 {
    background-color: #33CC99 !important;
}

.layui-bg-green4 {
    background-color: #16baaa !important;
}

.layui-bg-green5 {
    background-color: #16b777 !important;
}

.layui-bg-red1 {
    background-color: #FF9900 !important;
}

.layui-bg-blue1 {
    background-color: #6699CC !important;
}

.layui-bg-blue2 {
    background-color: #66CCCC !important;
}

.layui-bg-blue3 {
    background-color: #66CCFF !important;
}

.layui-bg-blue4 {
    background-color: #3399CC !important;
}

.layui-bg-purple {
    background-color: #6E6E9F !important;
}

.layui-bg-purple1 {
    background-color: #996699 !important;
}

.tdt-infowindow-content-wrapper,
.tdt-infowindow-tip {
    background: linear-gradient(to right, #39B55A, #80C63E) !important;
}

/* .tdt-infowindow-content {
    margin: 0 !important;
} */

.tdt-infowindow-content .div {
    color: #6E6E9F
}

.workpic {
    position: relative;
    right: 0;
    padding: 8px 12px;
}

.swiper-container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.swiper-slide {
    background-size: cover;
    background-position: center;
}

.gallery-top {
    z-index: 1000 !important;
    width: 300px;
    height: 200px;
}

.gallery-thumbs {
    z-index: 1000 !important;
    box-sizing: border-box;
    cursor: pointer;
    margin-top: 10px;
    width: 300px;
    height: 50px;
}

.gallery-thumbs .swiper-slide {
    z-index: 1000 !important;
    height: 100%;
    opacity: 0.8;
}

.gallery-thumbs .swiper-slide-active {
    opacity: 1;
}

.swiper-container img {
    width: 100%;
}

.pad5 {
    padding: 5px;
}

.pad10 {
    padding: 10px;
}

.pad15 {
    padding: 15px;
}

.pad20 {
    padding: 20px !important;
}

.layui-table-col-set,
.layui-table-fixed-r,
.layui-table-grid-down,
.layui-table-header,
.layui-table-page,
.layui-table-tips-main,
.layui-table-tool,
.layui-table-total,
.layui-table-view,
.layui-table[lay-skin=line],
.layui-table[lay-skin=row] {
    border: none;
}

/* 全站表格：极淡虚线行列分割 + 表头分割线 + 内容居中（推广自 work 页）
   两级选择器并用：裸表格(.layui-table)与表格视图(.layui-table-view)内的表格都要覆盖，
   视图级特异性压过 layui line 皮肤的清竖线规则 */
.layui-table td,
.layui-table th,
.layui-table-view .layui-table td,
.layui-table-view .layui-table th {
    border: none;
    border-bottom: 1px dashed #d8dde3;
    border-right: 1px dashed #d8dde3;
}

.layui-table-header {
    border-bottom: 1px dashed #d8dde3;
}

/* 深色主题(theme-blue)：表格分割线用深色系淡线, 浅灰线在深底上太扎眼 */
body.theme-blue .layui-table td,
body.theme-blue .layui-table th,
body.theme-blue .layui-table-view .layui-table td,
body.theme-blue .layui-table-view .layui-table th {
    border-bottom-color: #1E2A55;
    border-right-color: #1E2A55;
}

body.theme-blue .layui-table-header {
    border-bottom-color: #1E2A55;
}

.layui-table-view .layui-table-cell {
    text-align: center;
}


/* admin页操作列：9个单字按钮更紧凑(左右内边距减半) */
.test-plant-work-table .layui-table-view .layui-btn-xs.icon-btn {
    padding: 0 5px;
}

/* 紧凑操作列：field 以 bar_ 开头的列（轮廓/回放/轨迹/表格等单按钮操作列）
   压掉单元格左右 15px 内边距，配合列宽 56px 让按钮排列紧凑。
   注意：表格全局 cellMinWidth 默认 100，需在这些列上单独设 minWidth 才能收窄。 */
.layui-table th[data-field^='bar_'] .layui-table-cell,
.layui-table td[data-field^='bar_'] .layui-table-cell {
    padding: 6px 2px;
}

.layui-tab-title {
    border-bottom-width: 0;
}

.theme-green .layui-layout-admin .layui-body>.layui-tab>.layui-tab-content {
    background: #F5F7F9;
}

.theme-green .mark-bg {
    background-color: #9ACD89 !important;
}

.theme-blue .mark-bg {
    background-color: #1A62B8 !important;
}
.mark-color td{
    color: white !important;
}

.theme-blue .layui-layout-admin .layui-body>.layui-tab>.layui-tab-content {
    background: #090F2A !important;
}

/* .theme-blue .ew-console-wrapper {
    background: #031D2B !important;
} */

.theme-blue .layui-card {
    background: #090F2A;
}

.theme-blue .layui-card-header {
    border-bottom: 1px solid #090F2A;
}

.theme-blue .layui-body {
    background: #282C34 !important;
}

.theme-blue .layui-btn {
    background: #2E54A9;
    /* background: #009CDF; */
    border-left: 1px solid #3E66C0;
}

.theme-blue .layui-laypage button,
.theme-blue .layui-laypage input {
    color: #e6e5e5;
    background: #2E54A9;
    border: none;
}

.theme-blue .layui-laypage select {
    color: #e6e5e5;
    background: #2E54A9;
    border: none;
}

.theme-blue .layui-tab-brief>.layui-tab-title .layui-this {
    color: #458BE3;
}

.theme-green .test-badge .layui-badge,
.theme-blue .test-badge .layui-badge,
.theme-green .work-badge .layui-badge,
.theme-blue .work-badge .layui-badge {
    font-size: 14px;
    margin-right: 5px;
    height: 30px;
    line-height: 30px !important;
}

.theme-blue .layui-tab-brief>.layui-tab-more li.layui-this:after,
.theme-blue .layui-tab-brief>.layui-tab-title .layui-this:after {
    border-color: #458BE3 !important;
}

.theme-blue .layui-table {
    color: #C6D5DC;
    background-color: #0D1025 !important;
}

.theme-blue .layui-table tbody tr:hover,
.theme-blue .layui-table thead tr,
.theme-blue .layui-table-click,
.theme-blue .layui-table-header,
.theme-blue .layui-table-hover,
.theme-blue .layui-table-mend,
.theme-blue .layui-table-patch,
.theme-blue .layui-table-tool,
.theme-blue .layui-table-total,
.theme-blue .layui-table-total tr,
.theme-blue .layui-table[lay-even] tr:nth-child(even) {
    background-color: #131836;
}

.layui-layout-admin .layui-header {
    background: linear-gradient(to right, #18191B, #282C34) !important;
}

.theme-blue .layui-layout-admin .layui-header {
    background: linear-gradient(to bottom, #080A20, #0F1B47) !important;
}

.layui-layout-admin .layui-side {
    /* background-color: #262932 !important; */
    background: linear-gradient(to right, #18191B, #282C34) !important;
}

.theme-blue .layui-layout-admin .layui-side {
    /* background-color: #262932 !important; */
    background: linear-gradient(to right, #080A20, #0F1B47) !important;
}

.theme-blue .layui-badge-blue {
    color: #CFD9F1;
    background: #2E54A9;
    border: none;
}

.theme-blue .layui-badge-green {
    color: #BFF2E0;
    background: #079966;
    border: none;
}

.theme-blue .layui-badge-coffee {
    color: #FAD5C9;
    background: #D93F36;
    border: none;
}

.theme-blue .layui-badge {
    line-height: 20px;
}

.theme-blue .layui-table-sort .layui-table-sort-asc {
    border-bottom-color: #458BE3;
}

.theme-blue .layui-table-sort .layui-table-sort-desc {
    border-top-color: #458BE3;
}

.theme-blue .dtree-theme-icon {
    color: #458BE3 !important;
}

.theme-blue .dtree-theme-ficon {
    color: #458BE3 !important;
}

.theme-blue .dtree-theme-item:hover,
.theme-blue .dtree-theme-item-this {
    color: #fff;
    background: linear-gradient(to right, #2E54A9, #367CCC) !important;
}

.theme-blue .dtree-theme-item cite {
    color: #A0BCC9 !important;
}

.theme-blue .layui-nav-tree .layui-nav-child dd.layui-this a,
.theme-blue .layui-nav-tree .layui-this>a,
.theme-blue .layui-nav-tree .layui-this>a:hover {
    color: #fff;
    background: #2E54A9 !important;
}

.theme-blue .layui-nav-tree>.layui-nav-item>a::before {
    background-color: #2E54A9;
}

.theme-blue .layui-layer.layui-layer-admin .layui-layer-title {
    color: #AECAD6;
    background: #070D24 !important;
}

.theme-blue .layui-laypage .layui-laypage-curr .layui-laypage-em {
    background-color: #2E54A9 !important;
}

.theme-green .layui-nav-tree .layui-nav-child dd.layui-this a,
.theme-green .layui-nav-tree .layui-this>a,
.theme-green .layui-nav-tree .layui-this>a:hover {
    background: linear-gradient(to right, #39B55A, #80C63E) !important;
}

.theme-green .layui-nav-tree>.layui-nav-item>a:before {
    background-color: #39B55A;
}

.theme-green .layui-btn {
    background: linear-gradient(to bottom, #39B55A, #80C63E) !important;
    /* background-image: linear-gradient( 135deg, #39B55A 10%, #80C63E 100%); */
}
.theme-green .car-belong{
    color: #39B55A;
    font-weight: bold;
}
.theme-blue .car-belong{
    color: #fff;
    font-weight: bold;
}
.theme-blue .layui-layer-prompt .layui-layer-input{
    color: #fff;
    border-color: #070D24;
    background: #070D24 !important;
}
.theme-blue .note-wrapper{
    background-color: #0F1736;
}
.theme-blue .note-wrapper .note-item {
    background-color: #0F1736;
    border-color: #1E84CB;
}
.theme-blue .note-wrapper .note-item .note-item-time,
.theme-blue .note-wrapper .note-item .note-item-content{
    color: #fff;
}

.theme-green .layui-btn-danger {
    background: #ff5722 !important;
}

.theme-green .layui-layer.layui-layer-admin .layui-layer-btn .layui-layer-btn0 {
    background: linear-gradient(to bottom, #39B55A, #80C63E) !important;
    border: none;
}

.theme-green .layui-layer.layui-layer-admin .layui-layer-btn .layui-layer-btn1 {
    background: linear-gradient(to bottom, #FC3525, #FF5722) !important;
    color: #fff;
    border: none;
}
.theme-blue .layui-layer.layui-layer-admin .layui-layer-btn .layui-layer-btn1 {
    background: linear-gradient(to bottom, #FC3525, #FF5722) !important;
    color: #fff;
    border: none;
}
.theme-blue .layui-layer.layui-layer-admin .layui-layer-btn .layui-layer-btn0 {
    border: none;
    background-color: #294C98;
}

.layui-layout-admin .layui-body>.layui-tab>.layui-tab-title {
    background: #282C34 !important;
}

.theme-blue .layui-layout-admin .layui-body>.layui-tab>.layui-tab-title {
    background: #090F2A !important;
}

.admin-tabs-control {
    background: #282C34 !important;
    border: none;
}

.theme-blue .admin-tabs-control {
    background: #090F2A !important;
    border: none;
}

.admin-tabs-control.layui-icon-prev {
    border: none;
}

.admin-tabs-control {
    background: #282C34 !important;
}

.layui-layout-admin .layui-body>.layui-tab>.layui-tab-title li.layui-this,
.layui-layout-admin .layui-body>.layui-tab>.layui-tab-title li:hover {
    background: linear-gradient(to bottom, #050813, #090F2A) !important;
}

.theme-blue .layui-layout-admin .layui-body>.layui-tab>.layui-tab-title li.layui-this,
.layui-layout-admin .layui-body>.layui-tab>.layui-tab-title li:hover {
    background: linear-gradient(to bottom, #080A20, #0F1B47) !important;
}

.theme-blue .layui-input,
.theme-blue .layui-textarea {
    background: #3578C9 !important;
    /* background: linear-gradient(to bottom, #2E54A9, #367CCC) !important; */
    color: #e6e5e5;
    border: none;
}

.theme-blue .tdt-container.tdt-touch-drag.tdt-touch-drag {
    background: rgba(15, 27, 71, 0.8) !important;
}

.theme-blue .tdt-infowindow-content-wrapper,
.theme-blue .tdt-infowindow-tip {
    background: rgba(11, 12, 30, 0.8) !important;
}

.theme-blue .tdt-infowindow-content-wrapper::before {
    position: absolute;
    bottom: 0;
    left: 0;
    content: "";
    width: 10px;
    height: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #02a6b5;
    border-left: 2px solid #02a6b5;
    border-radius: 20%;
}

.theme-blue .tdt-infowindow-content-wrapper::after {
    position: absolute;
    top: 0;
    right: 0;
    content: "";
    width: 10px;
    height: 10px;
    margin-bottom: 20px;
    border-top: 2px solid #02a6b5;
    border-right: 2px solid #02a6b5;
    border-radius: 20%;
}

.theme-blue .tdt-infowindow-content::before {
    position: absolute;
    top: 0;
    left: 0;
    content: "";
    width: 10px;
    height: 10px;
    border-top: 2px solid #02a6b5;
    border-left: 2px solid #02a6b5;
    border-radius: 20%;
}

.theme-blue .tdt-infowindow-content::after {
    position: absolute;
    bottom: 0;
    right: 0;
    content: "";
    width: 10px;
    height: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #02a6b5;
    border-right: 2px solid #02a6b5;
    border-radius: 20%;
}

.index-datac{
    display: block;
    width: 19px;
    height: 19px;
    background: url(../images/g-data-center.png);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}
.theme-blue .index-datac{
    display: block;
    width: 19px;
    height: 19px;
    background: url(../images/data-center.png);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}
.index-note{
    display: block;
    width: 19px;
    height: 19px;
    background: url(../images/g-note.png);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}
.theme-blue .index-note{
    display: block;
    width: 19px;
    height: 19px;
    background: url(../images/note.png);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}
.index-sf{
    display: block;
    width: 24px;
    height: 24px;
    background: url(../images/g-sf.png);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}
.theme-blue .index-sf{
    display: block;
    width: 24px;
    height: 24px;
    background: url(../images/sf.png);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}
.index-user{
    display: inline-block;
    padding-top: 26px;
    width: 24px;
    height: 24px;
    background: url(../images/g-head.jpg);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
}
.theme-blue .index-user{
    display: inline-block;
    padding-top: 26px;
    width: 24px;
    height: 24px;
    background: url(../images/head.jpg);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
}

.theme-blue .index-flexible {
    color: #249CF2 !important;
}

.theme-blue .index-refresh {
    color: #249CF2 !important;
}

.theme-blue .index-huName {
    color: #249CF2 !important;
}
.theme-blue .index-theme{
    color: #249CF2 !important;
}
.theme-blue .layui-nav-more{
    border: none;
    /* border-color:#249CF2 transparent transparent !important; */
}
.theme-blue .layui-layer{
    background-color:#0F1736;
    color: #b8c7ce;
}
.theme-blue .layui-btn.layui-btn-primary{
    background-color: #71B2D4;
    border: none;
    color: #fff;
}
.theme-green .layui-nav-more{
    border: none;
    /* border-color:#249CF2 transparent transparent !important; */
}
.theme-green .layui-layout-admin .layui-header a{
    color: #49B954 !important;
}

.layui-tab-title .layui-this {
    color: #b8c7ce;
}

.layui-layout-admin .layui-body>.layui-tab>.layui-tab-title li {
    border: none;
}

.theme-green .layui-layout-admin .layui-body>.layui-tab>.layui-tab-title li.layui-this:after {
    background: none;
}

.theme-blue .layui-layout-admin .layui-body>.layui-tab>.layui-tab-title li.layui-this:after {
    background: none;
}

.theme-green .layui-layer.layui-layer-admin .layui-layer-title {
    background: linear-gradient(to right, #39B55A, #80C63E) !important;
}

.theme-green .layui-tab-brief>.layui-tab-title .layui-this {
    color: #5FBE4B;
}

.theme-green .layui-tab-brief>.layui-tab-more li.layui-this:after,
.theme-green .layui-tab-brief>.layui-tab-title .layui-this:after {
    border-color: #5FBE4B !important;
}

.theme-green .layui-laypage .layui-laypage-curr .layui-laypage-em {
    background-color: #5FBE4B !important;
}

.layui-btn-black {
    display: inline-block;
    height: 38px;
    line-height: 38px;
    padding: 0 18px;
    white-space: nowrap;
    text-align: center;
    font-size: 14px;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.7) !important;
    width: 150px;
    margin-top: 10px !important;
    margin-left: 0 !important;
}

.layui-tab .layui-tab-title:after{
    border-bottom: none !important;
}
.layui-btn-group>.layui-btn+.layui-btn {
    border-radius: 0 !important;
}
.layui-btn-group .layui-btn {
    border-left: 1px dashed rgba(255, 255, 255, .5) !important;
    border-bottom: none !important;
}
.layui-btn-group .layui-btn:first-child {
    border-left: none !important;
    border-radius: 0 !important;
}

.layui-table-view:after {
    background: transparent !important;
}
.layui-layer-setwin span {
    color: #fff !important;
}

/* admin 弹窗(绿/藏青渐变标题栏)右上窗口控制图标统一白色:
   easyweb 给三钮配的 layui-icon 字体图标中, 最大化(\e622)/还原(\e758)字形是长方形,
   与窗口钮期望的方框图形不符; layui 自带的 css 方框伪元素才是标准图形但默认深色描边。
   处理: 字体图标伪元素整个去掉, 用 css 方框重画并描白 ——
   常态=单个空心白方框, 最大化后(还原钮)=后层空心框+前层实心小白块错位(标准还原图形);
   最小化横线直接描白。只作用于 layui-layer-admin 皮肤, 普通浅色标题弹窗不受影响 */
.layui-layer.layui-layer-admin .layui-layer-setwin .layui-layer-min:before {
    border-bottom-color: #fff !important;
}
.layui-layer.layui-layer-admin .layui-layer-setwin .layui-layer-min:hover:before {
    background-color: #fff !important;
}
.layui-layer.layui-layer-admin .layui-layer-setwin .layui-layer-max:before,
.layui-layer.layui-layer-admin .layui-layer-setwin .layui-layer-maxmin:before {
    content: none !important;       /* 去掉长方形字体图标 */
}
.layui-layer.layui-layer-admin .layui-layer-setwin .layui-layer-max:after {
    border-color: #fff !important;  /* 单个空心白方框 */
}
.layui-layer.layui-layer-admin .layui-layer-setwin .layui-layer-maxmin:before {
    border-color: #fff !important;  /* 后层空心白框 */
    background: transparent !important;
}
.layui-layer.layui-layer-admin .layui-layer-setwin .layui-layer-maxmin:after {
    border-color: #fff !important;  /* 前层实心小白块 */
    background-color: #fff !important;
}
.layui-layer.layui-layer-admin .layui-layer-setwin .layui-layer-max:hover:after,
.layui-layer.layui-layer-admin .layui-layer-setwin .layui-layer-maxmin:hover:after {
    border-color: #fff !important;  /* hover 保持白色(layui 默认变蓝) */
}

/* ===== 搜索定位高亮闪烁（树节点/表格行通用） ===== */
@keyframes locate-flash-anim {
    0%, 100% { background-color: transparent; }
    20%, 60% { background-color: #FFE083; }
}

.locate-flash {
    animation: locate-flash-anim 2.4s ease-in-out 2;
}

/* ===== 合作社设备弹层：点合作社在树右侧滑出设备格子（试点 work 页） ===== */
.tree-col {
    position: relative;
}

.dev-flyout {
    display: none;
    /* fixed 定位：脱离内容区容器的 overflow 裁剪，才能盖在侧边栏上方；
       位置/宽度/最大高度由 JS 按树列实际位置摆放(work.html positionDevFlyout) */
    position: fixed;
    box-sizing: border-box;   /* 宽度含边框内边距，否则右缘会超出摆放宽度盖住工具栏 */
    overflow: hidden;         /* 圆角裁剪；滚动交给内部格子区，标题栏保持固定 */
    background: #fff;
    border: 1px solid #e6ebf1;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
    z-index: 9999;
    padding: 6px;             /* 收紧内边距，多显示设备名字符 */
}

.dev-flyout.show {
    display: flex;
    flex-direction: column;
    animation: dev-flyout-in .18s ease-out;
}

@keyframes dev-flyout-in {
    from { opacity: 0; transform: translateX(-8px); }
    to { opacity: 1; transform: none; }
}

.dev-flyout-head {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 2px 5px;
    border-bottom: 1px solid #eef1f5;
    margin-bottom: 6px;
    cursor: move;          /* 可拖拽 */
    user-select: none;
}

.dev-flyout-head .dev-flyout-close,
.dev-flyout-head .dev-flyout-care {
    cursor: pointer;
}

.dev-flyout-title {
    flex: 1;
    font-size: 13px;
    font-weight: bold;
    color: #2f3a4a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dev-flyout-close {
    cursor: pointer;
    color: #8a94a6;
}

.dev-flyout-close:hover {
    color: #333;
}

.dev-chip-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    overflow-y: auto;   /* 只有格子区滚动，标题栏/底部关闭固定不动 */
    min-height: 0;
}

/* 底部右下关闭按钮（与右上 × 等效，免鼠标长途移动） */
.dev-flyout-foot {
    flex-shrink: 0;
    text-align: right;
    padding-top: 6px;
    border-top: 1px solid #eef1f5;
    margin-top: 6px;
}

.dev-flyout-close2 {
    font-size: 15px;
    padding: 2px 4px;
}

.dev-chip {
    height: 28px;
    font-size: 12px;
    color: #39B55A;
    background: #f4fbf8;
    border: 1px solid #bfe3d2;
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 4px;
    transition: all .15s;
}

.dev-chip:hover {
    border-color: #39B55A;
    background: #e8f7ef;
}

.dev-chip.active {
    color: #fff;
    background: #39B55A;
    border-color: #39B55A;
}

/* 深色主题 */
body.theme-blue .dev-flyout {
    background: #0E1433;
    border-color: #1B2450;
}

/* 无设备的合作社（work页弹层模式配套）：图标和文字变淡 */
.dtree-nav-div.coop-empty > cite,
li[data-id^="6"] > .dtree-nav-div.coop-empty > i {
    color: #b3bac4 !important;
}

body.theme-green li[data-id^="6"] > .dtree-nav-div.coop-empty > i,
body.theme-blue li[data-id^="6"] > .dtree-nav-div.coop-empty > i {
    color: #b3bac4 !important;
}

body.theme-blue .dev-flyout-head {
    border-bottom-color: #1B2450;
}

body.theme-blue .dev-flyout-foot {
    border-top-color: #1B2450;
}

body.theme-blue .dev-flyout-title {
    color: #DCE3F6;
}

body.theme-blue .dev-chip {
    color: #458BE3;
    background: #101B45;
    border-color: #2A3E7E;
}

body.theme-blue .dev-chip:hover {
    background: #16224F;
}

body.theme-blue .dev-chip.active {
    color: #fff;
    background: #2E54A9;
    border-color: #2E54A9;
}

/* ===== 设备树：合作社内的设备两列排布，纵向滚动长度减半 =====
   只作用于合作社(6开头)的子级容器，组织层级排列不变。
   注意：必须限定在 .dtree-nav-show(展开态) 上——
   若写成基础规则，优先级会压过 dtree 折叠时的 display:none，导致"展开后收不回去"。 */
ul.dtree-nav-ul-sid[data-id^="6"].dtree-nav-show {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
}

/* 去掉设备(叶子)节点的图标，省出横向空间 */
ul.dtree-nav-ul-sid[data-id^="6"] > li > .dtree-nav-div > i[data-spread="last"] {
    display: none;
}

/* ===== 树图标精简：去掉 ± 图标，只留文件夹（点文件夹即展开/收起） =====
   dtree 的一级(±)和二级(文件夹)图标都带 data-spread、都绑定了展开收起事件，
   所以直接隐藏第一个图标(±)，保留原样配色的文件夹图标即可。
   :first-of-type 精确命中每行第一个 i（±），不误伤文件夹。 */
.dtree-nav-div > i[data-spread]:first-of-type {
    display: none;
}

/* 无下级的组织节点(如没有合作社的县)按叶子渲染，
   给它的二级图标注入文件夹字形，与兄弟节点统一。
   :not(:first-of-type) 排除已隐藏的 ± 位置; 权限分配树(#authorityAssignTree)同样不适用 */
li[data-id^="3"] > .dtree-nav-div > i[data-spread="last"]:not(:first-of-type):not(#treeTbTree *):not(#authorityAssignTree *)::before,
li[data-id^="4"] > .dtree-nav-div > i[data-spread="last"]:not(:first-of-type):not(#treeTbTree *):not(#authorityAssignTree *)::before,
li[data-id^="5"] > .dtree-nav-div > i[data-spread="last"]:not(:first-of-type):not(#treeTbTree *):not(#authorityAssignTree *)::before {
    content: "\e618";
}

/* 图标颜色同步变淡，与文字一致 */
li[data-id^="3"] > .dtree-nav-div > i[data-spread="last"]:not(:first-of-type):not(#treeTbTree *):not(#authorityAssignTree *),
li[data-id^="4"] > .dtree-nav-div > i[data-spread="last"]:not(:first-of-type):not(#treeTbTree *):not(#authorityAssignTree *),
li[data-id^="5"] > .dtree-nav-div > i[data-spread="last"]:not(:first-of-type):not(#treeTbTree *):not(#authorityAssignTree *) {
    color: #b3bac4 !important;
}

/* 无下级组织节点(叶子态, cite 自带 data-leaf="leaf" 标记)文字变淡，与有下级的组织一眼区分。
   排除 system/org 页的组织树(#treeTbTree, 只到县级县必然叶子)和权限分配树(#authorityAssignTree,
   权限开关全是叶子不能变灰, 2026-09-30用户令) */
li[data-id^="3"] > .dtree-nav-div > cite[data-leaf="leaf"]:not(#treeTbTree *):not(#authorityAssignTree *),
li[data-id^="4"] > .dtree-nav-div > cite[data-leaf="leaf"]:not(#treeTbTree *):not(#authorityAssignTree *),
li[data-id^="5"] > .dtree-nav-div > cite[data-leaf="leaf"]:not(#treeTbTree *):not(#authorityAssignTree *) {
    color: #b3bac4 !important;
}

/* 浅色主题(theme-green)：合作社(6开头)节点图标与按钮同色
   按钮为 #39B55A→#80C63E 渐变，取中间色 */
body.theme-green li[data-id^="6"] > .dtree-nav-div > i[data-spread] {
    color: #5CBE4C !important;
}

/* 两列后单元格变窄，设备号超长时省略号截断防换行错乱 */
ul.dtree-nav-ul-sid[data-id^="6"] > li > .dtree-nav-div {
    overflow: hidden;
}

ul.dtree-nav-ul-sid[data-id^="6"] > li > .dtree-nav-div > cite {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== 响应式适配：视口 <= 1600px 时生效 =====
   覆盖系统显示缩放 125%/150%（有效宽度约 1536/1280）、浏览器缩放、窄窗口场景。
   视口 >= 1600px 的大屏不受任何影响。 */
@media screen and (max-width: 1600px) {

    /* 搜索行由 inline-block 改为 flex 允许折行：
       日期区间/输入框/按钮组按需换到下一行，不再溢出卡片、按钮不再被挤出可视区 */
    .layui-card-body > .layui-inline,
    .layui-card-body .layui-inline.pad15 {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px 10px;
    }
    .layui-card-body .layui-inline .layui-input-inline {
        flex: 1 1 150px;
        width: auto;
        max-width: 190px;
        min-width: 120px;
    }

    /* 地图弹窗左列按钮：不再写死 150px 宽，按钮列高度明显缩短 */
    .layui-btn-black {
        width: auto;
        min-width: 110px;
        padding: 0 12px;
        margin-top: 8px !important;
    }

    /* 地图弹窗右图片面板内容跟随面板宽度 */
    .gallery-top,
    .gallery-thumbs {
        width: calc(100% - 20px);
        max-width: 300px;
    }

    /* 统计徽章行折行时的间距 */
    .work-badge .layui-badge {
        margin: 2px 5px 2px 0;
    }

    /* 卡片内图片防溢出 */
    .layui-card-body img {
        max-width: 100%;
    }
}

/* ===== 设备树列宽度：中间档 20%（2/12 不够、3/12 太宽） =====
   树列用 tree-col、右侧配对列用 tree-content，成对保证 20%+80%=100% 不换行。
   <768px 时 layui 自带的 col-sm12 全宽接管（移动端上下堆叠）。 */
@media screen and (min-width: 768px) {
    .tree-col {
        width: 15% !important;
    }

    .tree-content {
        width: 85% !important;
    }
}
/* ===== 面积徽章深色主题(theme-blue)适配 =====
   浅色主题用浅底+同色字(行内样式); 深色页面上浅底刺眼, 改半透明同色底+亮一档同色字+原色外框 */
.theme-blue #work_sum_max_area {
    background-color: rgba(179, 137, 45, .2) !important;
    color: #D9B678 !important;
    border-color: #B3892D !important;
}
.theme-blue #work_sum_area,
.theme-blue #ad_work_sum_area {
    background-color: rgba(7, 153, 102, .2) !important;
    color: #57C79D !important;
    border-color: #079966 !important;
}
.theme-blue #ad_work_sum_areac {
    background-color: rgba(69, 139, 227, .2) !important;
    color: #82B3F2 !important;
    border-color: #458BE3 !important;
}

/* ===== "更多"下拉菜单配色(layui 2.10 官方 dropdown, 全局) =====
   文字色必须落在 .layui-menu-body-title 上 —— layui 自带 color:initial 会强制近黑色,
   只改 li 在深色主题下就是黑底黑字 */
.layui-dropdown.layui-panel {
    background-color: #F3FAF6;
    border-color: rgba(22, 186, 170, .45) !important;
    box-shadow: 0 2px 10px rgba(22, 186, 170, .18) !important;
}
.layui-dropdown .layui-menu {
    background-color: transparent;
    margin: 4px 0;
}
.layui-dropdown .layui-menu .layui-menu-body-title {
    color: #0E8A76;
}
.layui-dropdown .layui-menu li:hover {
    background-color: #E2F6F1;
}
.layui-dropdown .layui-menu li:hover .layui-menu-body-title {
    color: #16BAAA;
}

/* 深色主题(theme-blue) */
.theme-blue .layui-dropdown.layui-panel {
    background-color: #101A2C;
    border-color: #2A3B55 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .5) !important;
}
.theme-blue .layui-dropdown .layui-menu .layui-menu-body-title {
    color: #AECAD6;
}
.theme-blue .layui-dropdown .layui-menu li:hover {
    background-color: #1B2A44;
}
.theme-blue .layui-dropdown .layui-menu li:hover .layui-menu-body-title {
    color: #7FB0E8;
}

/* ===== 表格面积警示: 作业面积 < 合格面积 时该行两值单元格背景变红(两主题通用) ===== */
.layui-table td.area-warn {
    background-color: #E64A4A !important;
    color: #fff !important;
    font-weight: 600;
}

/* ===== 表格面积警示: 合格面积 ≠ 平台面积(库值) 时该行两值单元格背景变#D6ECF0(2026-09-29用户裁定, admin页, 两主题通用) ===== */
.layui-table td.plat-warn {
    background-color: #D6ECF0 !important;
    font-weight: 600;
}

/* ===== count页面积徽章深色主题(theme-blue)适配(浅色为行内浅底同色字, 参考work页) ===== */
.theme-blue #count_sum_max_area {
    background-color: rgba(179, 137, 45, .2) !important;
    color: #D9B678 !important;
    border-color: #B3892D !important;
}
.theme-blue #count_sum_area,
.theme-blue #count_sum_label_area {
    background-color: rgba(7, 153, 102, .2) !important;
    color: #57C79D !important;
    border-color: #079966 !important;
}

/* ===== admin操作列: 直排小按钮与"更多"下拉按钮统一等宽 ===== */
.test-plant-work-table .layui-table-view .layui-btn-group .layui-btn-xs.icon-btn {
    width: 30px;
    min-width: 30px;
    padding: 0;
    box-sizing: border-box;
}

/* ===== his/count页面积徽章深色主题(theme-blue)适配(浅色为行内浅底同色字, 与work/count同款) ===== */
.theme-blue #his_count_sum_max_area {
    background-color: rgba(179, 137, 45, .2) !important;
    color: #D9B678 !important;
    border-color: #B3892D !important;
}
.theme-blue #his_count_sum_area,
.theme-blue #his_count_sum_label_area {
    background-color: rgba(7, 153, 102, .2) !important;
    color: #57C79D !important;
    border-color: #079966 !important;
}

/* ===== count两页(work/count, his/count)徽章行垂直居中: 与work/work的上下间距视觉一致 =====
   徽章本身同高同字号, 差在行内基线对齐(默认baseline使徽章在行框内偏低5px) */
.ss-count-table .layui-card-header .layui-badge {
    vertical-align: middle;
    position: relative;
    top: -2.4px; /* 对齐work/work的基线位置(其行内基线使徽章偏上2.4px) */
}



/* ===== 2026-10-24 双主题样式补丁(全前端主题审查) ===== */

/* 修1: plat-warn浅底补深字(theme-blue下浅底浅字不可读) */
.layui-table td.plat-warn {
    color: #0A5A6E !important;
}

/* 修8(2026-10-24三修): primary按钮常态+hover文字都白——
   theme-green把所有按钮强制绿底(含取消钮), 需要全局primary白字(常态)压过layui的#5f5f5f,
   hover再压过layui的#333; 删全局白字那版是我改错的, 恢复 */
.layui-btn-primary {
    color: #fff;
}
.layui-btn-primary:hover,
.layui-btn-group .layui-btn-primary:hover {
    color: #fff;
}
.theme-blue .layui-btn-group .layui-btn-primary:hover {
    border-color: #71B2D4;
}

/* 修5: 无skin的普通layer弹窗标题栏深色化(theme-blue下浅标题+深内容割裂) */
.theme-blue .layui-layer:not(.layui-layer-admin) .layui-layer-title {
    color: #b8c7ce;
    background-color: #0F1736;
    border-bottom: 1px solid #1E2A5A;
}

/* 修9: 列显隐面板label hover深色化(原近白闪条) */
.theme-blue .col-toggle-panel label:hover {
    background: rgba(255, 255, 255, .08);
}

/* 修10: 设备浮层关闭钮hover(theme-blue下变黑不可见) */
body.theme-blue .dev-flyout-close:hover {
    color: #fff;
}

/* 修3: his/work面积徽章theme-blue适配(照his_count写法) */
.theme-blue #his_work_sum_max_area {
    background-color: rgba(179, 137, 45, .2) !important;
    color: #D9B678 !important;
    border-color: #B3892D !important;
}
.theme-blue #his_work_sum_area {
    background-color: rgba(7, 153, 102, .2) !important;
    color: #57C79D !important;
    border-color: #079966 !important;
}

/* 修4: work/check面积徽章theme-blue适配 */
.theme-blue #check_sum_area {
    background-color: rgba(7, 153, 102, .2) !important;
    color: #57C79D !important;
    border-color: #079966 !important;
}
