/**
 * Nifty(Bootstrap3) → Bootstrap4 兼容层
 * -----------------------------------------------------------------------------
 * 用途：阶段二迁移「内容页」时，layout 改为引用 bootstrap4 + 本文件，
 *       可以在不改页面标记的前提下先保持原视觉，再逐页清理旧写法。
 *       本文件只做 CSS 映射，不提供任何 BS3 的 JS 行为（modal/collapse 请用 BS4 原生）。
 *
 * 覆盖范围（2026-10 全量审核后的精确用量，按 class token 统计）：
 *   form-group 6847、control-label 6478、form-inline 337、caret 54、label 37、
 *   pull-left/right 19、divider 16、form-horizontal 6、thumbnail 5、btn-default 1；
 *   panel / well / glyphicon / col-xs-* / img-responsive / img-circle 在模板中已归零
 *   （映射仍保留，原因见下方保留策略）。
 *
 * 保留策略：本文件不是临时补丁。表单设计器生成的 HTML 存放在数据库中，
 *   formmeta/fillform 等页面直接渲染这份 HTML，其中同样使用 form-group /
 *   control-label / col-xs-* 等旧类，模板层的批量替换覆盖不到，因此这些映射
 *   需要长期保留。如需回潮检查，请自行统计模板中这些旧类的 token 用量。
 *
 * 已完成的批量迁移（2026-10）：
 *   col-xs-* → col-*，img-responsive → img-fluid，img-circle → rounded-circle，
 *   input-group-addon → input-group-text
 *
 * 待评估（承担布局语义，不能机械替换）：
 *   form-group / control-label —— 被 .form-inline 查询条布局依赖（见 bs4-inner.css），
 *   只能在逐页确认上下文后按表单粒度改造。
 * -----------------------------------------------------------------------------
 */

:root {
    /* 主色与外壳（/pub/css/bs4/bs4shell.css）保持一致，避免菜单/顶栏是亮蓝、
       内容页按钮是旧海洋蓝的割裂感；其余语义色同步换成更清爽的一组 */
    --compat-primary: #2f6bff;
    --compat-primary-dark: #1b4bdb;
    --compat-info: #0ea5e9;
    --compat-info-dark: #0284c7;
    --compat-success: #10b981;
    --compat-success-dark: #059669;
    --compat-warning: #f59e0b;
    --compat-warning-dark: #d97706;
    --compat-danger: #ef4444;
    --compat-danger-dark: #dc2626;

    --compat-border: #d5dfec;
    --compat-radius: 6px;
    --compat-heading-bg: #eef2f9;
    --compat-heading-color: #1b2537;
    --compat-text: #414e68;
    --compat-text-strong: #1b2537;
    --compat-page-bg: #e9edf4;
    --compat-muted: #6f7c92;
    --compat-space: 10px;
}

/* =============================================================================
   1. 栅格：BS3 的 col-xs-*（BS4 已删除该断点）
   ============================================================================= */
.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6,
.col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

.col-xs-12 { flex: 0 0 100%; max-width: 100%; }
.col-xs-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
.col-xs-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.col-xs-9 { flex: 0 0 75%; max-width: 75%; }
.col-xs-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-xs-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
.col-xs-6 { flex: 0 0 50%; max-width: 50%; }
.col-xs-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.col-xs-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-xs-3 { flex: 0 0 25%; max-width: 25%; }
.col-xs-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-xs-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }

/* =============================================================================
   2. 浮动与对齐
   ============================================================================= */
.pull-left { float: left !important; }
.pull-right { float: right !important; }

.element-center {
    text-align: center;
}

.element-center > * {
    display: inline-block;
}

/* 清除浮动（BS3 的 clearfix 在 BS4 中仍存在，这里补充 Nifty 的写法） */
.clearfix::after {
    display: block;
    clear: both;
    content: "";
}

/* =============================================================================
   3. 间距工具（Nifty 命名）
   ============================================================================= */
.pad-all { padding: var(--compat-space) !important; }
.pad-ver { padding-top: var(--compat-space) !important; padding-bottom: var(--compat-space) !important; }
.pad-hor { padding-left: var(--compat-space) !important; padding-right: var(--compat-space) !important; }
.pad-top { padding-top: var(--compat-space) !important; }
.pad-btm { padding-bottom: var(--compat-space) !important; }
.pad-lft { padding-left: var(--compat-space) !important; }
.pad-rgt { padding-right: var(--compat-space) !important; }
.pad-no { padding: 0 !important; }

.mar-all { margin: var(--compat-space) !important; }
.mar-ver { margin-top: var(--compat-space) !important; margin-bottom: var(--compat-space) !important; }
.mar-hor { margin-left: var(--compat-space) !important; margin-right: var(--compat-space) !important; }
.mar-top { margin-top: var(--compat-space) !important; }
.mar-btm { margin-bottom: var(--compat-space) !important; }
.mar-lft { margin-left: var(--compat-space) !important; }
.mar-rgt { margin-right: var(--compat-space) !important; }
.mar-no { margin: 0 !important; }

/* =============================================================================
   4. 文字工具（Nifty 命名，BS4 无对应类）
   ============================================================================= */
.text-2x { font-size: 2em; }
.text-3x { font-size: 3em; }
.text-4x { font-size: 4em; }
.text-5x { font-size: 5em; }

.text-xs { font-size: .75rem; }
.text-sm { font-size: .875rem; }
.text-lg { font-size: 1.25rem; }

.text-thin { font-weight: 300; }
.text-normal { font-weight: 400; }
.text-semibold { font-weight: 600; }
.text-bold { font-weight: 700; }
.text-bolder { font-weight: 800; }

.text-main { color: #25476a; }
.text-color-red { color: #d9534f; }
.text-color-green { color: #5cb85c; }
.text-color-blue { color: #5bc0de; }
.text-color-orange { color: #f0ad4e; }

/* =============================================================================
   5. 背景与边框
   ============================================================================= */
.bg-trans { background-color: transparent !important; }

/* Nifty 的 .bg-* 会同时把文字改为白色（BS4 的 .bg-* 只设置背景色）。
   不补这条，彩色底上的文字/图标会继承正文灰色 #7a878e，对比度不足。
   warning 为黄色底，用深色文字保证可读性。 */
.bg-primary,
.bg-secondary,
.bg-success,
.bg-info,
.bg-danger,
.bg-dark {
    color: #fff;
}

.bg-warning {
    color: #212529;
}

.bg-light,
.bg-white {
    color: #212529;
}

.bord-all { border: 1px solid #dee2e6 !important; }
.bord-top { border-top: 1px solid #dee2e6 !important; }
.bord-btm { border-bottom: 1px solid #dee2e6 !important; }
.bord-lft { border-left: 1px solid #dee2e6 !important; }
.bord-rgt { border-right: 1px solid #dee2e6 !important; }
.bord-no { border: 0 !important; }

/* =============================================================================
   6. 组件映射
   ============================================================================= */

/* 6.1 面板：BS3 .panel → BS4 .card 视觉（保持旧标记可直接显示） */
.panel, .card.hy-card {
    margin-bottom: 1rem;
    background-color: #fff;
    border: 1px solid var(--compat-border);
    border-radius: var(--compat-radius);
}

.panel-heading, .card.hy-card .card-header {
    padding: .75rem 1.25rem;
    background-color: var(--compat-heading-bg);
    border-bottom: 1px solid var(--compat-border);
    border-radius: calc(var(--compat-radius) - 1px) calc(var(--compat-radius) - 1px) 0 0;
}

.panel-title, .card.hy-card .card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.panel-body, .card.hy-card .card-body {
    padding: 1.25rem;
}

/*
 * BS3 的 .panel-body 自带 clearfix（:before/:after + clear），BS4 没有。
 * 少了它，面板里浮动的内容（如 .btn-group.pull-left 的工具按钮行）撑不开父高度，
 * 按钮会“跑出面板”落到灰色背景上。
 */
.panel-body::before, .card.hy-card .card-body::before,
.panel-body::after, .card.hy-card .card-body::after {
    display: table;
    content: "";
}

.panel-body::after, .card.hy-card .card-body::after {
    clear: both;
}

.panel-footer, .card.hy-card .card-footer {
    padding: .75rem 1.25rem;
    background-color: var(--compat-heading-bg);
    border-top: 1px solid var(--compat-border);
    border-radius: 0 0 calc(var(--compat-radius) - 1px) calc(var(--compat-radius) - 1px);
}

.panel-primary > .panel-heading, .card.hy-card-primary > .card-header { background-color: var(--compat-primary); color: #fff; }
.panel-success > .panel-heading, .card.hy-card-success > .card-header { background-color: #198754; color: #fff; }
.panel-info > .panel-heading, .card.hy-card-info > .card-header { background-color: #0dcaf0; color: #fff; }
.panel-warning > .panel-heading, .card.hy-card-warning > .card-header { background-color: #ffc107; color: #212529; }
.panel-danger > .panel-heading, .card.hy-card-danger > .card-header { background-color: #dc3545; color: #fff; }

/* 6.2 输入框前后缀：BS3 .input-group-addon → BS4 .input-group-text */
.input-group-addon {
    display: flex;
    align-items: center;
    padding: .375rem .75rem;
    margin-bottom: 0;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    text-align: center;
    white-space: nowrap;
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: var(--compat-radius);
}

.input-group > .input-group-addon:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group > .input-group-addon:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* 6.2.1 输入框组合按钮：BS3 .input-group-btn（BS4 改用 .input-group-append）
   BS4 的 .input-group 是 flex，这里让 span 也作为 flex 容器把里面的按钮撑满 */
.input-group-btn {
    display: flex;
    flex: 0 0 auto;
    font-size: 0;
    white-space: nowrap;
}

.input-group-btn > .btn {
    height: 100%;
    border-radius: var(--compat-radius);
}

.input-group > .input-group-btn:not(:first-child) > .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group > .input-group-btn:not(:last-child) > .btn {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* 6.2.1.1 BS3 写法变体：.input-group-btn 内多包了一层 .form-group 再放按钮
   （登录页「查看密码」等）。.form-group 自带 margin-bottom 且内部 .btn 是
   inline-block，按钮会比输入框矮一截，这里让包装层撑满、按钮拉满高度 */
.input-group-btn > .form-group {
    display: flex;
    align-items: stretch;
    margin-bottom: 0;
}

.input-group-btn > .form-group > .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/* 6.2.2 输入框组合内的第三方下拉（chosen / select2）
   BS4 的 .input-group 是 flex + flex-wrap:wrap，而 chosen/select2 生成的容器默认 width:100%，
   会把后面的按钮（如“企业详情”）挤到下一行，这里让下拉自适应剩余宽度、按钮紧跟其后 */
.input-group > .chosen-container,
.input-group > .select2-container {
    flex: 1 1 auto;
    width: 1% !important;
    min-width: 0;
}

/* 下拉后面还有按钮时，去掉下拉右侧圆角，避免与按钮圆角叠成双弧 */
.input-group > .chosen-container:not(:last-child) .chosen-single,
.input-group > .select2-container:not(:last-child) .select2-selection--single {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* 6.2.3 Bootstrap 4.0 的 .card-block 在 4.1+ 改名为 .card-body，这里补回内边距 */
.card-block {
    padding: 1.25rem;
}

/* 6.3 标签：BS3 .label → BS4 .badge */
.label {
    display: inline-block;
    padding: .25em .6em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: var(--compat-radius);
}

.label-primary { background-color: var(--compat-primary); }
.label-success { background-color: #198754; }
.label-info { background-color: #0dcaf0; }
.label-warning { background-color: #ffc107; color: #212529; }
.label-danger { background-color: #dc3545; }
.label-default { background-color: #6c757d; }

/* 6.4 块级提示：BS3 .well（Nifty 未改这个组件，沿用 BS3 原值）
   页面已改用 .hy-well，旧 .well 保留给第三方插件使用 */
.well,
.hy-well {
    min-height: 20px;
    padding: 19px;
    margin-bottom: 1rem;
    background-color: #f5f5f5;
    border: 1px solid #e3e3e3;
    border-radius: var(--compat-radius);
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
}

.well-sm,
.hy-well-sm { padding: 9px; border-radius: calc(var(--compat-radius) - 1px); }

.well-lg,
.hy-well-lg { padding: 24px; border-radius: calc(var(--compat-radius) + 4px); }

/* 6.4.1 下拉箭头：BS4 用 .dropdown-toggle::after，删掉了 BS3 的 .caret。
   页面里仍有手写的 <span class="caret"></span>，BS4 下会什么都不显示，这里按 BS3 原值补回 */
.caret {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 2px;
    vertical-align: middle;
    border-top: 4px dashed;
    border-top: 4px solid \9;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
}

/* .dropdown-toggle 的按钮，BS4 已经用 ::after 画了箭头，
   再叠加手写的 <span class="caret"></span> 就成了双箭头，这里把手写的隐藏掉 */
.dropdown-toggle .caret {
    display: none;
}

/* 纯图标下拉按钮（如列表卡片右上角的 ⋮）：BS4 会自动追加 ::after 小三角，
   与图标叠在一起看起来像"两个按钮"，这里隐藏掉，还原 BS3 只显示一个图标的效果 */
.widget-control .dropdown-toggle::after {
    display: none;
}

/* 6.4.2 删除 nifty.min.css 后，业务页面仍在使用的 Nifty 组件规则（原值搬自 nifty.min.css） */
.img-xs {
    width: 32px;
    height: 32px;
}

.panel-bordered-default,
.panel-default.panel-bordered, .card.hy-card-default.panel-bordered,
.hy-card-bordered-default {
    border: 1px solid #bdcccf;
}

/* 导入向导（wz = wizard） */
.wz-icon-inline li > a .icon-wrap {
    display: inline-block;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    color: inherit;
}

.wz-icon-bw li > a .icon-wrap,
.wz-icon-bw li > a p {
    transition: all .5s;
}

.wz-steps li .wz-desc {
    opacity: 0;
    transition: opacity .5s;
}

.wz-steps .active .wz-desc {
    opacity: 1;
    transition: opacity .5s;
}

/* 表单里图片轮播的控制条：BS4 改名为 carousel-control-prev/next，Nifty 的 auto-hide 是默认隐藏 */
.carousel-control.auto-hide,
.carousel-control-prev.auto-hide,
.carousel-control-next.auto-hide {
    opacity: 0;
}

.carousel-indicators.out {
    bottom: 0;
}

.carousel-indicators.out + .carousel-inner {
    padding-bottom: 30px;
}

/* BS3 的行内单选/多选：BS4 改成了 .form-check-inline，这里按 BS3 原值补回布局 */
.radio-inline,
.checkbox-inline {
    position: relative;
    display: inline-block;
    padding-left: 20px;
    margin-bottom: 0;
    font-weight: 400;
    vertical-align: middle;
    cursor: pointer;
}

.radio-inline + .radio-inline,
.checkbox-inline + .checkbox-inline {
    margin-top: 0;
    margin-left: 10px;
}

.radio-inline > input[type="radio"],
.checkbox-inline > input[type="checkbox"] {
    position: absolute;
    margin-left: -20px;
}

/* BS3 的块级单选/多选 .radio / .checkbox（BS4 改为 .form-check）。
   只还原「<label> 包裹 <input>」这种标准 BS3 结构（表单设计器及其生成的表单）；
   用 :has 限定条件，避免影响 .radio 内 input 与 label 平级的老写法（如 magic-radio）；
   浏览器不支持 :has 时整条规则被忽略，保持现状。 */
.radio:has(> label > input[type="radio"]),
.checkbox:has(> label > input[type="checkbox"]) {
    position: relative;
    display: block;
    margin-top: 10px;
    margin-bottom: 10px;
}

.radio:has(> label > input[type="radio"]) > label,
.checkbox:has(> label > input[type="checkbox"]) > label {
    min-height: 20px;
    padding-left: 20px;
    margin-bottom: 0;
    font-weight: 400;
    cursor: pointer;
}

.radio:has(> label > input[type="radio"]) > label > input[type="radio"],
.checkbox:has(> label > input[type="checkbox"]) > label > input[type="checkbox"] {
    position: absolute;
    margin-left: -20px;
    margin-top: 4px;
}

/* BS4 的 .nav-fill 只拉伸带 .nav-item 的子项，页面里的旧结构是 <ul class="nav"><li>，
   这里让不带 .nav-item 的 li 也能等宽（等价 BS3 的 .nav-justified） */
.nav-fill > li {
    flex: 1 1 auto;
    text-align: center;
}

/* 6.4.0 下拉菜单显隐：BS3 用 .open，BS4 用 .show。
   bootstrap-select 1.13.18 会按当前 Bootstrap 版本输出对应的状态类，
   BS4 下菜单和容器都加 .show，交给 BS4 原生规则显示即可；
   这里只给还在手写 .open 的旧标记（第三方插件、老页面）兜底 */
.open > .dropdown-menu {
    display: block;
}

/* 6.4.1 下拉菜单：BS3 是 <ul class="dropdown-menu"><li><a>，BS4 改成 .dropdown-item，
   旧标记里的 <a> 没有任何样式（无内边距、不换行、hover 无反馈），这里补齐 */
.dropdown-menu > li > a,
.dropdown-menu > li > button {
    display: block;
    width: 100%;
    padding: .25rem 1.5rem;
    clear: both;
    font-weight: 400;
    color: #212529;
    text-align: inherit;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
}

.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus,
.dropdown-menu > li > button:hover,
.dropdown-menu > li > button:focus {
    color: #16181b;
    text-decoration: none;
    background-color: #f8f9fa;
}

.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus {
    color: #fff;
    background-color: var(--compat-primary);
}

.dropdown-menu > .disabled > a,
.dropdown-menu > .disabled > a:hover,
.dropdown-menu > .disabled > a:focus {
    color: #6c757d;
    background-color: transparent;
}

.dropdown-menu > li.divider {
    height: 0;
    margin: .5rem 0;
    overflow: hidden;
    border-top: 1px solid #e9ecef;
}

.dropdown-menu > .dropdown-header {
    display: block;
    padding: .25rem 1.5rem;
    margin-bottom: 0;
    font-size: .78rem;
    color: #6c757d;
    white-space: nowrap;
}

/* 6.5 其他小类 */
.btn-xs,
.btn-xxs {
    padding: .1rem .35rem;
    font-size: .72rem;
    line-height: 1.4;
    border-radius: .2rem;
}

/* BS3 的 .btn-default 在 BS4 已删除，但 bootstrap-treetable 等插件会在运行时注入，
   这里按 BS4 的 btn-outline-secondary 视觉兜底 */
.btn-default {
    color: #333;
    background-color: #fff;
    border-color: #ccc;
}

.btn-default:hover,
.btn-default:focus,
.btn-default:active,
.btn-default.active {
    color: #333;
    background-color: #e6e6e6;
    border-color: #adadad;
}

.img-circle {
    border-radius: 50% !important;
}

.table-condensed > thead > tr > th,
.table-condensed > thead > tr > td,
.table-condensed > tbody > tr > th,
.table-condensed > tbody > tr > td,
.table-condensed > tfoot > tr > th,
.table-condensed > tfoot > tr > td {
    padding: .3rem;
}

.btn-pink {
    color: #fff;
    background-color: #e05c7f;
    border-color: #d94f72;
}

.btn-pink:hover {
    color: #fff;
    background-color: #d94f72;
    border-color: #cf4368;
}

/* =============================================================================
   7. 布局容器
   ============================================================================= */

/* Nifty 的滚动容器（旧壳侧栏/消息面板使用） */
.nano {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.nano > .nano-content {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    overflow-y: auto;
}

/* 响应式显隐（BS3 写法，需在页面里改用 d-* 工具类后删除） */
@media (max-width: 767.98px) {
    .hidden-xs { display: none !important; }
    .visible-xs { display: block !important; }
}

@media (min-width: 768px) {
    .visible-xs { display: none !important; }
}

/* 点击水波纹：BS4 壳不使用 waves.js，这里做无操作占位，避免旧类无意义报错 */
.waves-effect {
    position: relative;
    overflow: hidden;
}

/* =============================================================================
   8. Nifty 视觉基线
   -----------------------------------------------------------------------------
   数值基线来自旧主题，2026-11 起与 BS4 外壳统一做了现代化调整（见 :root）：
     plugins/nifty/css/nifty.min.css          正文/标题/按钮/表单/面板基础值
     css/themes/type-a/theme-ocean.css        旧页面使用的蓝色主题（现已换成 #2f6bff）
   本节放在文件末尾，用于覆盖前 1~7 节的临时默认值（那些只负责类名映射）。
   ============================================================================= */

/* 8.1 文字：正文 13px / #7a878e，标题 600 / #4d627b（Nifty body、h1-h6） */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 13px;
    font-weight: normal;
    color: var(--compat-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-weight: 600;
    color: var(--compat-text-strong);
}

a {
    color: var(--compat-text);
    text-decoration: none;
}

a:hover,
a:focus {
    color: #6e7a81;
    text-decoration: none;
}

/* Nifty 的占位符颜色是 #b1b9bd */
.form-control::placeholder,
.form-control::-webkit-input-placeholder {
    color: #b1b9bd !important;
    opacity: 1;
}

/* 8.2 表单控件：高 30px、13px 字号、6px 圆角、淡边框（与按钮同高） */
.form-control {
    height: 30px;
    padding: 4px 8px;
    font-size: 13px;
    color: #555;
    border: 1px solid var(--compat-border);
    border-radius: var(--compat-radius);
    box-shadow: none;
    transition: border-color .5s;
}

/* BS4 单独给 select 写死了高度，同优先级覆盖掉（与 .form-control 一致 30px） */
select.form-control:not([size]):not([multiple]) {
    height: 30px;
}

/* 8.2.1 x-editable 编辑弹层（editable-popup）内控件统一 30px 高。
   输入框/下拉框本已由上面的 .form-control 保证 30px，这里再显式声明一次，
   防止被 .form-inline / .form-control-sm 等规则改回去；按钮的 .btn-sm 只有 23px，
   需要单独补齐到 30px 才能与输入框齐平。 */
.editable-container .editable-input .form-control,
.editable-container .editable-input input,
.editable-container .editable-input select {
    height: 30px;
    min-height: 30px;
    padding: 4px 8px;
    font-size: 13px;
    line-height: 20px;
    box-sizing: border-box;
}

/* 文本输入框右侧 24px 是留给 x-editable 清除按钮（.editable-clear-x）的，不能压掉 */
.editable-container .editable-input input.form-control {
    padding: 4px 24px 4px 8px;
}

.editable-container .editable-buttons .btn {
    height: 30px;
    min-height: 30px;
    padding: 0 10px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* 按钮内是 glyphicon 图标，bs3 的 top:-1px 会让它在 flex 里偏移，这里归零 */
.editable-container .editable-buttons .btn .glyphicon,
.editable-container .editable-buttons .btn i {
    top: 0;
    line-height: 1;
}

.form-control:focus {
    border-color: var(--compat-primary);
    box-shadow: 0 0 0 3px rgba(47, 107, 255, .12);
    transition: border-color .2s, box-shadow .2s;
}

/* 输入框前后缀：Nifty 用白底 + 淡边框 + 最小宽度 45px（不是 BS4 的灰色块） */
.input-group-text,
.input-group-addon {
    justify-content: center;
    min-width: 45px;
    padding: 3px 12px;
    font-size: 13px;
    color: var(--compat-text);
    background-color: #fff;
    border: 1px solid var(--compat-border);
    border-radius: var(--compat-radius);
}

/* 8.3 按钮：4px 10px / 12px / 6px 圆角 / .25s 过渡 + 悬浮阴影
   基础高度 = 4 + 18(12px × 1.5) + 4 + 2(边框) = 28px；
   .bs4-inner 内容页里由 bs4-inner.css 统一抬到 30px，与输入框、下拉框一致 */
.btn {
    padding: 4px 10px;
    font-size: 12px;
    line-height: 1.5;
    border-radius: var(--compat-radius);
    transition: all .25s;
}

.btn:focus,
.btn.focus {
    outline: 0;
    box-shadow: none;
}

.btn:not(:disabled):not(.disabled):hover {
    box-shadow: 0 4px 10px rgba(23, 43, 77, .16);
}

.btn:not(:disabled):not(.disabled):active,
.btn:not(:disabled):not(.disabled).active {
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, .2);
}

.btn-lg {
    padding: 10px 16px;
    font-size: 17px;
    line-height: 1.44;
    border-radius: var(--compat-radius);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 11px;
    line-height: 1.5;
    border-radius: var(--compat-radius);
}

.btn-xs,
.btn-xxs {
    padding: 1px 5px;
    font-size: 11px;
    line-height: 1.5;
    border-radius: var(--compat-radius);
}

/* 按钮配色：主题蓝（--compat-primary）+ 语义色，连 active 一起覆盖
   （BS4 的 :active 规则特异度更高，只写 .btn-primary 会被它盖回默认蓝） */
.btn-default,
.btn-secondary {
    color: var(--compat-text);
    background-color: #fff;
    border-color: var(--compat-border) !important;
}

.btn-default:hover,
.btn-secondary:hover {
    color: var(--compat-text);
    background-color: #ededed;
    border-color: var(--compat-border) !important;
}

.btn-primary,
.btn-primary:focus,
.btn-primary:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled).active {
    color: #fff;
    background-color: var(--compat-primary);
    border-color: var(--compat-primary);
}

.btn-primary:hover {
    color: #fff;
    background-color: var(--compat-primary-dark);
    border-color: var(--compat-primary-dark);
}

.btn-info,
.btn-info:focus,
.btn-info:not(:disabled):not(.disabled):active,
.btn-info:not(:disabled):not(.disabled).active {
    color: #fff;
    background-color: var(--compat-info);
    border-color: var(--compat-info);
}

.btn-info:hover {
    color: #fff;
    background-color: var(--compat-info-dark);
    border-color: var(--compat-info-dark);
}

.btn-success,
.btn-success:focus,
.btn-success:not(:disabled):not(.disabled):active,
.btn-success:not(:disabled):not(.disabled).active {
    color: #fff;
    background-color: var(--compat-success);
    border-color: var(--compat-success);
}

.btn-success:hover {
    color: #fff;
    background-color: var(--compat-success-dark);
    border-color: var(--compat-success-dark);
}

.btn-warning,
.btn-warning:focus,
.btn-warning:not(:disabled):not(.disabled):active,
.btn-warning:not(:disabled):not(.disabled).active {
    color: #fff;
    background-color: var(--compat-warning);
    border-color: var(--compat-warning);
}

.btn-warning:hover {
    color: #fff;
    background-color: var(--compat-warning-dark);
    border-color: var(--compat-warning-dark);
}

.btn-danger,
.btn-danger:focus,
.btn-danger:not(:disabled):not(.disabled):active,
.btn-danger:not(:disabled):not(.disabled).active {
    color: #fff;
    background-color: var(--compat-danger);
    border-color: var(--compat-danger);
}

.btn-danger:hover {
    color: #fff;
    background-color: var(--compat-danger-dark);
    border-color: var(--compat-danger-dark);
}

/* 8.4 面板：无边框、3px 圆角、灰绿色标题栏、浅色页脚（Nifty .panel 系列）
   标题栏不用 Nifty 的固定 42px 高度：BS4 页面里常直接放查询表单/按钮，
   定高会裁内容，这里用相同的内边距还原观感 */
.panel, .card.hy-card {
    border: 0;
    border-radius: var(--compat-radius);
}

/*
 * 注意：BS5 的 .card 是 flex 纵向容器（.panel 是普通块级）。
 * 页面给卡片写死 height（如统计页 .rightHeight）时，内部工具条/子卡片会被
 * flex-shrink 压缩，需要在页面里用 flex 工具类（d-flex flex-column + flex-shrink-0）
 * 明确表达布局意图，不要在这里把 .hy-card 改回 block —— 那会破坏 BS5 卡片语义。
 */

/* 面板之间的纵向间距：BS4 主题的 .card 默认 margin-bottom: 30px，
   查询区/按钮区/表格区连续排列时显得太松，统一收到 10px（与页面四周留白同值） */
.card.hy-card {
    margin-bottom: 10px;
}

.panel-heading, .card.hy-card .card-header {
    /* 与卡片 body 统一：10px 16px */
    padding: 10px 16px;
    color: var(--compat-heading-color);
    background-color: var(--compat-heading-bg);
    border-bottom: 1px solid #f5f7f8;
    border-radius: var(--compat-radius) var(--compat-radius) 0 0;
}

/* 标题是 h3，8.1 的 h1~h6 颜色会盖掉彩色标题栏的白字，这里跟随父级颜色 */
.panel-title, .card.hy-card .card-title {
    font-size: 1.15em;
    font-weight: 400;
    color: inherit;
}

.panel-footer, .card.hy-card .card-footer {
    /* 与卡片 body 统一：10px 16px */
    padding: 10px 16px;
    color: var(--compat-text);
    background-color: #fdfdfe;
    border-top: 1px solid rgba(0, 0, 0, .02);
    border-radius: 0 0 var(--compat-radius) var(--compat-radius);
}

/* Nifty 里 panel-* 的标题栏和页脚是同一个色块 */
.panel-primary > .panel-heading, .card.hy-card-primary > .card-header,
.panel-primary > .panel-footer, .card.hy-card-primary > .card-footer {
    color: #fff;
    background-color: var(--compat-primary);
    border-color: var(--compat-primary);
}

.panel-info > .panel-heading, .card.hy-card-info > .card-header,
.panel-info > .panel-footer, .card.hy-card-info > .card-footer {
    color: #fff;
    background-color: var(--compat-info);
    border-color: var(--compat-info);
}

.panel-success > .panel-heading, .card.hy-card-success > .card-header,
.panel-success > .panel-footer, .card.hy-card-success > .card-footer {
    color: #fff;
    background-color: var(--compat-success);
    border-color: var(--compat-success);
}

.panel-warning > .panel-heading, .card.hy-card-warning > .card-header,
.panel-warning > .panel-footer, .card.hy-card-warning > .card-footer {
    color: #fff;
    background-color: var(--compat-warning);
    border-color: var(--compat-warning);
}

.panel-danger > .panel-heading, .card.hy-card-danger > .card-header,
.panel-danger > .panel-footer, .card.hy-card-danger > .card-footer {
    color: #fff;
    background-color: var(--compat-danger);
    border-color: var(--compat-danger);
}

/* 8.5 标签 / 徽标：Nifty 圆角 3px、字重 600；徽标是 12px + 10px 圆角 */
.label {
    padding: .2em .6em .3em;
    font-weight: 600;
    border-radius: var(--compat-radius);
}

.label-default { color: #333; background-color: #e3e8ee; }
.label-primary { background-color: var(--compat-primary); }
.label-info { background-color: var(--compat-info); }
.label-success { background-color: var(--compat-success); }
.label-warning { background-color: var(--compat-warning); }
.label-danger { background-color: var(--compat-danger); }

.badge {
    padding: 3px 7px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background-color: #777;
    border-radius: 10px;
    vertical-align: baseline;
}

.badge-primary { background-color: var(--compat-primary); }

/* 8.5.1 颜色变体：必须显式补回，否则基础 .badge 的 #777 灰底（本文件 877 行，
   在 bootstrap4.min.css 之后加载）会按层叠顺序盖掉 BS4 自带的 .badge-success 等，
   导致 badge badge-success / badge-danger 等一律显示成灰色。这里用主题色变量兜底。 */
.badge-secondary { background-color: #6c757d; }
.badge-success { background-color: var(--compat-success); }
.badge-danger { background-color: var(--compat-danger); }
.badge-warning { background-color: var(--compat-warning); }
.badge-info { background-color: var(--compat-info); }
.badge-light { color: #212529; background-color: #f8f9fa; }
.badge-dark { background-color: #343a40; }

/* 8.6 下拉菜单：13px 字号、3px 圆角、Nifty 的投影与 5px 上间距 */
.dropdown-menu {
    margin: 5px 0 0;
    font-size: 13px;
    border-radius: var(--compat-radius);
    box-shadow: 0 3px 7px rgba(0, 0, 0, .3);
}

.dropdown-header {
    padding: 12px 15px 5px;
    font-size: .85em;
    font-weight: 700;
    color: var(--compat-text-strong);
    text-transform: uppercase;
}

/* 8.7 表格：浅灰分隔线（原 BS3 的 2px #ddd 在白色卡片里显得很重） */
.table > thead > tr > th {
    border-bottom: 1px solid #e8eef6;
}

.table > thead > tr > th,
.table > tbody > tr > th,
.table > tbody > tr > td,
.table > tfoot > tr > th,
.table > tfoot > tr > td {
    border-color: #e3eaf4;
}

/* 8.8 分页：Nifty 的 3px 圆角、灰色文字、主题色当前页 */
.pagination .page-link {
    color: var(--compat-text);
    border-color: var(--compat-border);
}

.pagination .page-link:hover {
    color: var(--compat-primary);
    border-color: var(--compat-primary);
}

.pagination .page-item.active .page-link {
    color: #fff;
    background-color: var(--compat-primary);
    border-color: var(--compat-primary);
}

.pagination .page-item.disabled .page-link {
    color: #dbdee0;
}

/* =============================================================================
   9. 面板标题栏控件：Nifty 的 .panel-control 与"图标标签页"
   -----------------------------------------------------------------------------
   这套标记在旧页面里很常见（21 个文件），BS4 没有对应实现，之前只在加载
   nifty.min.css 时才有样式。这里按 Nifty 的取值补回来，BS3/BS4 两种标记都兼容：
     BS3: <li class="active"><a>
     BS4: <li class="nav-item"><a class="nav-link active">
   ============================================================================= */

.panel-control {
    position: relative;
    float: right;
    height: 100%;
    padding: 0 15px 0 5px;
}

/* 标题栏里的控件按钮：Nifty 是"透明无边框"，颜色跟随标题栏文字 */
.panel-control .btn,
.panel-control .dropdown-toggle.btn {
    color: inherit;
    background-color: transparent;
    border: 0;
}

.panel-control .btn:hover,
.panel-control .open > .btn,
.panel-control .btn:active,
.panel-control .btn.active {
    box-shadow: none;
}

/* BS4 的 .nav 是 flex，这里必须用 inline-flex，
   否则 3 个页签会竖着堆起来（BS3 时代靠 .nav-tabs>li{float:left}） */
.panel-control .nav-tabs {
    display: inline-flex;
    flex-wrap: nowrap;
    height: 40px;
    margin-top: 2px;
    vertical-align: bottom;
    border: 0;
}

.panel-control .nav-tabs > li {
    height: 100%;
    margin-top: 1px;
    margin-right: 5px;
}

.panel-control .nav-tabs > li > a {
    display: block;
    height: 100%;
    padding: 0 15px;
    margin: 0;
    line-height: 40px;
    color: inherit;
    border: 0;
    border-radius: 3px 3px 0 0;
    background-color: transparent;
}

/* 未选中的页签整体变淡，Nifty 就是用透明度做的 */
.panel-control .nav-tabs > li > a {
    opacity: .6;
}

.panel-control .nav-tabs > li > a:hover {
    opacity: 1;
    color: inherit;
    background-color: rgba(0, 0, 0, .15);
}

/* 选中态：BS4 的 Tab 插件把 .active 加在 <a> 上，BS3 是加在 <li> 上 */
.panel-control .nav-tabs > li > a.active,
.panel-control .nav-tabs > li.active > a {
    opacity: 1;
    color: inherit;
    background-color: transparent;
    box-shadow: inset 0 -2px 0 0 #1e3a57;
}

/* 彩色标题栏上用半透明白，保证可见 */
.panel[class*="panel-"] .panel-control .nav-tabs > li > a.active, .card.hy-card[class*="hy-card-"] .panel-control .nav-tabs > li > a.active,
.panel[class*="panel-"] .panel-control .nav-tabs > li.active > a, .card.hy-card[class*="hy-card-"] .panel-control .nav-tabs > li.active > a {
    box-shadow: inset 0 -2px 0 0 rgba(255, 255, 255, .7);
}

/* 标题栏里有浮动控件时撑起高度，避免控件溢出到面板外面 */
.panel-heading::after, .card.hy-card .card-header::after {
    display: table;
    clear: both;
    content: "";
}

/* BS3 的 .fade.in（BS4 改名 .show）：不补这条，老标记的页签第一个会 opacity:0 看不见 */
.fade.in {
    opacity: 1;
}

/* =============================================================================
   Nifty 版式/组件补丁
   BS4 删掉或改名、但本项目页面仍在用的 Nifty 自有类。
   取值全部照抄 plugins/nifty/css/nifty.min.css，保证与 BS3 时期视觉一致。
   主要用于「左侧内容 + 右侧属性面板」的双栏页面（如 admin/graph/design.html）。
   ============================================================================= */

/* 固定分栏：.fixed-fluid > .fixed-*-NNN + .fluid */
.fixed-fluid {
    margin-left: -10px;
    margin-right: -10px;
}

.fixed-fluid::after {
    content: "";
    display: block;
    clear: both;
}

.fixed-fluid > [class^="fixed-"],
.fixed-fluid [class*=" fixed-"] {
    padding-left: 10px;
    padding-right: 10px;
}

.fixed-fluid > .fluid {
    overflow: hidden;
    padding-left: 10px;
    padding-right: 10px;
}

.fixed-fluid > [class*="fixed-"] {
    background-color: #ecf0f5;
    border-radius: var(--compat-radius);
}

.panel .fixed-fluid [class*="fixed-"], .card.hy-card .fixed-fluid [class*="fixed-"] {
    background-color: transparent;
}

/* BS4 的栅格列不再浮动，只有 .fixed-fluid 内部才需要复原 */
@media (min-width: 768px) {
    .fixed-fluid > .pull-sm-right {
        float: right;
    }

    .fixed-fluid > .pull-sm-left {
        float: left;
    }

    .fixed-fluid > .fixed-sm-160 {
        width: 180px;
    }

    .fixed-fluid > .fixed-sm-200 {
        width: 220px;
    }

    .fixed-fluid > .fixed-sm-250 {
        width: 270px;
    }

    .fixed-fluid > .fixed-sm-300 {
        width: 320px;
    }

    .fixed-fluid > .fixed-sm-350 {
        width: 370px;
    }
}

/* 横向表单：BS4 已删除 .form-horizontal / .control-label，用 flex 复原 BS3 行为 */
.form-horizontal .form-group {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.form-horizontal .control-label {
    padding-top: 7px;
    margin-bottom: 0;
    text-align: right;
}

/* Nifty 圆角按钮 */
.btn-rounded {
    border-radius: 17px;
    overflow: hidden;
}

.btn-lg.btn-rounded {
    border-radius: 30px;
}

.btn-sm.btn-rounded {
    border-radius: 15px;
}

.btn-xs.btn-rounded,
.btn-xxs.btn-rounded {
    border-radius: 10px;
}

/* Nifty 扩展主题色按钮（BS4 只有 primary/secondary/success/info/warning/danger/dark） */
.btn-purple,
.btn-purple:focus {
    background-color: #b052c0;
    border-color: #ab47bc;
    color: #fff;
}

.btn-purple:hover,
.btn-purple:active,
.btn-purple.active,
.btn-active-purple.btn:active,
.btn-active-purple.btn.active,
.open > .dropdown-toggle.btn-purple {
    background-color: #953ca4;
    border-color: #953ca4;
    color: #fff;
}

/* Nifty 图标尺寸 */
.icon-lg {
    font-size: 1.333em;
    line-height: 1.095em;
    vertical-align: middle;
}

.icon-5x {
    font-size: 5em;
    line-height: 1em;
    vertical-align: middle;
}

/* 返回顶部按钮：默认隐藏，脚本加上 .in 才显示 */
.scroll-top {
    display: none;
}

.scroll-top.in {
    display: block;
    position: fixed;
    right: 15px;
    bottom: 45px;
    z-index: 999999;
    padding: 10px;
    font-size: 1.5em;
    color: #fff;
    cursor: pointer;
    background-color: #25476a;
    border-radius: 100%;
    box-shadow: none;
    transition: all .15s;
}

.scroll-top.in:hover {
    opacity: 1;
    box-shadow: 0 0 5px rgba(0, 0, 0, .2);
    transform: scale(1.1);
}

.scroll-top.in > i {
    display: block;
    width: 1em;
    height: 1em;
    line-height: 1.1em;
}

/* BS3 的 .affix（滚动吸顶）：BS4 已删除，配合 bs4-editable-compat.js 里的 $.fn.affix */
.affix {
    position: fixed;
}

/* =============================================================================
   BS2/BS3 的 .row-fluid 栅格容器
   BS3 的 .col-sm-* 自带 float:left，即使父级只是普通块级元素也能并排；
   BS4 的列改由 flex 父级决定宽度（flex:0 0 50%），父级不是 flex 时
   只剩 width:100%，一行两列就变成上下两行（表单一类的可视化设计器会踩到）。
   这里把 .row-fluid 变成 flex 容器，列宽交回给 .col-* 自己。
   ============================================================================= */
.row-fluid {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}

/* =============================================================================
   Summernote 的浮层（链接 / 图片 / 表格）
   summernote 是按 BS3 写的：浮层元素创建时就带 class="note-popover popover in"，
   靠 BS3 的 .popover{display:none} 默认隐藏，需要时再用 jQuery .show() 写内联 display。
   BS4 把 .popover 改成了 display:block，于是浮层一创建就浮在页面上
   （表现：工具栏附近多出一排表格按钮，或一个 "Delete table" 提示）。
   这里只补"默认隐藏"；summernote 的 .show() 是内联样式，优先级更高，不影响正常弹出。
   ============================================================================= */
.note-popover.popover {
    display: none;
}

/* =============================================================================
   Nifty 组件类（BS4 下没有定义，组件会退回无样式）
   取值原样来自 plugins/nifty/css/nifty.min.css。
   全量扫描 641 个已迁移页面后，仍缺样式的组件只剩这些，其余缺失类名
   在 BS3 时期也没有定义（如 btn-flat / input-group-md / uploader-list），不是迁移导致的。
   ============================================================================= */

/* 图文列表 / 评论（学生反馈、投诉列表等） */
.media-block .media-left {
    display: block;
    float: left;
}

.media-block .media-right {
    float: right;
}

.media-block .media-body {
    display: block;
    overflow: hidden;
    width: auto;
}

.media-block::after {
    content: "";
    display: table;
    clear: both;
}

.media-heading {
    margin-top: 0;
    margin-bottom: 5px;
}

.img-sm {
    width: 48px;
    height: 48px;
}

.comments .media-left {
    padding: 0;
}

.comments .media-body {
    padding-left: 10px;
    padding-bottom: 15px;
}

.comments .comment-header small {
    margin-left: 5px;
}

.comments .comment-body {
    padding-top: 15px;
}

.comments .comment-content {
    margin-bottom: 10px;
}

.comments .comment-photos img {
    border-radius: 5px;
}

.comments + .comments {
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, .07);
}

/* 内联盒 / 环形图中心文字（导入数据页） */
.box-inline {
    display: inline-block;
}

.pie-title-center {
    display: inline-block;
    position: relative;
    text-align: center;
}

.pie-value {
    display: block;
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 40px;
    margin-top: -20px;
    font-size: 14px;
    line-height: 40px;
    color: inherit;
}

/* 无底色按钮 / 图标按钮（按钮组里很常见） */
.btn-trans {
    padding-left: 5px;
    padding-right: 5px;
    background-color: transparent;
    border-color: transparent;
    box-shadow: none !important;
}

.btn-icon {
    padding-left: 9px;
    padding-right: 9px;
    box-shadow: none !important;
}

.btn-icon > i,
.btn-icon::before {
    display: inline-block;
    min-width: 1.05em;
}

/* 面板右上角的控件区（Nifty 用绝对定位，BS4 无此实现） */
.widget-control {
    position: absolute;
    top: 0;
    right: 0;
    padding: 10px;
}

/* -----------------------------------------------------------------------------
   时间线（.timeline）—— 取值原样来自 plugins/nifty/css/nifty.min.css
   BS4 下这些类没有任何定义，导致 .timeline-icon 变成通栏色块、
   .timeline-stat 不浮动、正文不缩进。数据采集导航等页面依赖它。
   -------------------------------------------------------------------------- */
.timeline {
    position: relative;
    padding-bottom: 40px;
    background-color: #ecf0f5;
    color: #7a878e;
}

.timeline::before,
.timeline::after {
    content: "";
    display: block;
    position: absolute;
    bottom: 20px;
    background-color: #bfc5c9;
}

/* 竖轴 */
.timeline::before {
    left: 49px;
    top: 20px;
    width: 1px;
}

/* 竖轴底端的小圆点 */
.timeline::after {
    left: 46px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: 1px solid #bfc5c9;
    background-color: #ecf0f5;
}

.timeline-header {
    position: relative;
    clear: both;
    margin-top: 50px;
    margin-bottom: 50px;
    border-radius: 3px;
}

.timeline-header .timeline-header-title {
    display: inline-block;
    min-width: 100px;
    padding: 7px 15px;
    text-align: center;
}

.timeline .timeline-header:first-child {
    margin-top: 15px;
    margin-bottom: 30px;
}

/* 左侧步骤区：定宽 + 浮动，时间线图标靠它定位 */
.timeline-stat {
    float: left;
    width: 100px;
    padding-bottom: 15px;
    text-align: center;
}

.timeline-entry {
    position: relative;
    clear: both;
    margin-top: 5px;
    margin-bottom: 25px;
}

.timeline-entry-inner {
    position: relative;
}

.timeline-time {
    display: inline-block;
    max-width: 70px;
    padding: 2px 3px;
    font-size: .85em;
    color: #7a878e;
    background-color: #ecf0f5;
}

.timeline-icon {
    display: block;
    width: 40px;
    height: 40px;
    margin: 5px auto 0;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    background-color: #ecf0f5;
}

.timeline-icon > i {
    line-height: 40px;
    vertical-align: .1em;
}

/* Nifty 的 .bg-* 会同时把文字设为白色（BS4 的 .bg-* 只设背景色）。
   时间线图标（如 <i class="fa fa-comment">）会继承正文的灰色 #7a878e，
   在彩色圆点里看起来发灰，这里按 Nifty 恢复为白色 */
.timeline-icon[class*="bg-"] > i {
    color: #fff;
}

.timeline-icon.bg-light > i,
.timeline-icon.bg-white > i {
    color: #212529;
}

.timeline-icon img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    vertical-align: top;
}

/* 空图标槽位：做成竖轴上的小圆点 */
.timeline-icon:empty {
    width: 12px;
    height: 12px;
    margin-top: 20px;
    border: 2px solid #a3acb1;
}

.timeline-label {
    position: relative;
    min-height: 50px;
    margin-left: 85px;
    padding: 15px;
    border-radius: 3px;
    background-color: #fff;
}

/* 指向竖轴的小三角 */
.timeline-label::after {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    margin: 15px 0 0 -9px;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-right: 9px solid #fff;
}

/* 面板内的时间线：底色跟随面板，正文块用浅灰底 */
.panel .timeline, .card.hy-card .timeline,
.panel .timeline::after, .card.hy-card .timeline::after,
.panel .timeline-time, .card.hy-card .timeline-time,
.panel .timeline-label, .card.hy-card .timeline-label,
.panel .timeline-icon:not([class^="bg-"]):not([class*=" bg-"]), .card.hy-card .timeline-icon:not([class^="bg-"]):not([class*=" bg-"]) {
    background-color: #fff;
}

.panel .timeline-label, .card.hy-card .timeline-label {
    margin-left: 100px;
    background-color: #f3f5f9;
    border: 0;
    box-shadow: none;
}

.panel .timeline-label::after, .card.hy-card .timeline-label::after {
    border-right-color: #f3f5f9;
}

/* 双列时间线（.timeline.two-column） */
.two-column.timeline {
    text-align: center;
}

.two-column.timeline::before {
    left: 50%;
}

.two-column.timeline::after {
    left: 50%;
    margin-left: -2px;
}

.two-column.timeline .timeline-entry {
    width: 50%;
    text-align: left;
}

.two-column.timeline .timeline-stat {
    margin-left: -50px;
}

.two-column.timeline .timeline-header {
    text-align: center;
}

.two-column.timeline .timeline-entry:nth-child(odd) {
    float: right;
}

.two-column.timeline .timeline-entry:nth-child(odd) .timeline-label {
    margin-left: 40px;
}

.two-column.timeline .timeline-entry:nth-child(even) {
    float: left;
}

.two-column.timeline .timeline-entry:nth-child(even) .timeline-stat {
    position: relative;
    left: 100%;
    margin-left: -50px;
}

.two-column.timeline .timeline-entry:nth-child(even) .timeline-label {
    left: -90px;
    margin-right: -40px;
}

.two-column.timeline .timeline-entry:nth-child(even) .timeline-label::after {
    left: auto;
    right: 0;
    margin: 15px -8px 0 0;
    border-right: 0 solid transparent;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-left: 9px solid #fff;
}

/* -----------------------------------------------------------------------------
   图标尺寸工具类（Nifty）—— 时间线、步骤条里常和图标字体一起用
   -------------------------------------------------------------------------- */
.icon-lg {
    font-size: 1.333em;
    line-height: 1.095em;
    vertical-align: middle;
}

.icon-2x {
    font-size: 2em;
    line-height: 1em;
}

.icon-3x {
    font-size: 3em;
    line-height: 1em;
}

.icon-4x {
    font-size: 4em;
    line-height: 1em;
}

/* 固定宽度图标：让多行文字前的图标对齐 */
.icon-fw {
    width: 1.33em;
    margin-right: 4px;
    text-align: center;
}

.icon-circle {
    border-radius: 50%;
}

.icon-wrap-xs {
    padding: 7px;
}

.icon-wrap .icon-txt {
    display: block;
    position: relative;
    width: 1em;
    line-height: 1em;
    text-align: center;
    vertical-align: top;
}

/* -----------------------------------------------------------------------------
   其他 Nifty 小类
   -------------------------------------------------------------------------- */
/* 细进度条（导入数据步骤页顶部那条） */
.progress-xs {
    height: 2px;
    margin-bottom: 10px;
}

.progress-xs .progress-bar {
    font-size: 0;
    line-height: 2px;
}

.progress-bar-dark {
    background-color: #3a444e;
}

.box-block {
    display: block;
}

/* Nifty 配色背景（BS4 只自带 primary/secondary/success/danger/warning/info/light/dark） */
.bg-purple {
    color: #fff;
    background-color: #ab47bc;
}

.bg-purple a {
    color: #fff;
}

.bg-purple a:hover,
.bg-purple a:focus {
    color: #fff;
}

.panel-bordered-primary,
.panel-primary.panel-bordered, .card.hy-card-primary.panel-bordered {
    border: 1px solid #25476a;
}

/* -----------------------------------------------------------------------------
   向导步骤条（.wz-steps，导入数据等页面）
   取值来自 nifty.min.css，但隐去了依赖 li.active 的三条显隐规则：
   BS4 的 tab 组件不再给 <li> 加 active（只加在 <a> 和面板上），
   照搬会让所有步骤只显示“完成勾”而看不到序号。
   -------------------------------------------------------------------------- */
.wz-steps {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 10px 0;
    list-style: none;
}

.wz-steps::after {
    content: "";
    display: table;
    clear: both;
}

.wz-steps li {
    transition: all .5s;
}

.wz-steps li > a {
    display: block;
    padding: 0;
    color: inherit;
    text-align: center;
}

/* 圆形序号标记：inline-block 才能收成一个小圆（原来是 inline，被块级子元素撑满整列） */
.wz-steps li > a .icon-wrap {
    display: inline-block;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
}

/* 完成标记没有可驱动的 active 状态，常显会和序号叠成两行，直接隐藏 */
.wz-steps .wz-icon-done {
    display: none;
}

/* 顶部横线：进度条绝对定位压在步骤圆点上，自身底色透明 */
.wz-heading {
    position: relative;
}

.wz-heading .progress {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    background-color: transparent;
}

.wz-heading.wz-w-label .progress {
    margin-top: -.5em;
}

/* 标题区带底色时文字转白：Nifty 的 .bg-* 会同时给 color:#fff，BS4 的只给背景色 */
.wz-heading[class*="bg-"] {
    color: #fff;
}

/* -----------------------------------------------------------------------------
   Nifty 伪图标（.pci-*）：用边框/伪元素画出的 ×、箭头，不依赖图标字体。
   弹窗右上角的关闭按钮就是 <button class="close"><i class="pci-cross pci-circle"></i></button>，
   BS4 的 .close 只给字号和透明度，没有内容，图标缺失时关掉按钮是空白的。
   -------------------------------------------------------------------------- */
.pci-cross,
.pci-circle {
    display: block;
    width: 1.3em;
    height: 1.3em;
}

.pci-cross {
    -webkit-transform: rotate(45deg);
    transform: rotate(45deg);
}

.pci-cross::before,
.pci-cross::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    box-shadow: inset 0 0 0 1px;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
}

.pci-cross::before {
    width: .78em;
    height: 2px;
}

.pci-cross::after {
    height: .8em;
    width: 2px;
}

.pci-circle {
    border: 1px solid;
    border-radius: 50%;
}

.pci-chevron::before {
    content: "";
    display: inline-block;
    position: relative;
    left: 0;
    top: -.05em;
    width: .555em;
    height: .555em;
    border-style: solid;
    border-width: 2px 2px 0 0;
    vertical-align: middle;
}

.pci-chevron.chevron-up::before {
    transform: rotate(-45deg);
}

.pci-chevron.chevron-right::before {
    transform: rotate(45deg);
}

.pci-chevron.chevron-down::before {
    top: -.2em;
    transform: rotate(135deg);
}

.pci-chevron.chevron-left::before {
    transform: rotate(-135deg);
}

/* BS4 的 .modal-header 是 flex + space-between，且给 .close 加了 margin-left:auto，
   而旧模板把关闭按钮写在 <h4 class="modal-title"> 前面，
   结果按钮被推到标题左侧。用 order 把它挪到最后，回到右上角 */
.modal-header > .close {
    order: 1;
}

/* 回到顶部按钮：默认隐藏，滚动后由 JS 加 .in 显示
   （BS4 页面不再加载 nifty.min.js，所以这里补回显隐，避免页尾出现一个空按钮。
   写成 .btn.scroll-top 是因为 bs4-inner.css 的 .btn 在 compat 之后加载，
   单类选择器会被它覆盖回 inline-flex） */
.btn.scroll-top {
    display: none;
}

.scroll-top.in {
    position: fixed;
    right: 15px;
    bottom: 45px;
    z-index: 999999;
    display: block;
    padding: 10px;
    font-size: 1.5em;
    color: #fff;
    background-color: #25476a;
    border-radius: 100%;
    cursor: pointer;
    opacity: 1;
    box-shadow: none;
    transition: all .15s;
}

.scroll-top.in:hover {
    box-shadow: 0 0 5px rgba(0, 0, 0, .2);
    transform: scale(1.1);
    transition: all .15s;
}

/* =============================================================================
   14. Nifty 内置组件补齐
   -----------------------------------------------------------------------------
   以下组件原本定义在 plugins/nifty/css/nifty.min.css（迁移 BS4 时整文件删除），
   但模板仍在用；这里按原值补回。配色做了两处映射：
   - 主色 #25476a → var(--compat-primary)（页面实际用的是 theme-ocean 主题）
   - LESS 未编译的 fade(#333,25%) → rgba(51,51,51,.25)
   ============================================================================= */

/* 14.1 开关 .toggle-switch（Nifty 定制的 Trowel Toggle Switch） */
.toggle-switch { display: none; }

.toggle-switch + label {
    display: inline-block;
    position: relative;
    height: 16px;
    max-height: 1em;
    cursor: pointer;
    -webkit-touch-callout: none;
    margin-right: 0;
    margin-bottom: 0;
    padding-left: 40px;
    line-height: 16px;
}

.toggle-switch + label:empty { padding-left: 30px; }

.toggle-switch + label:before {
    position: absolute;
    display: inline-block;
    left: 0;
    content: '';
    border-style: solid;
    width: 30px;
    height: 16px;
    border-width: 0;
    border-color: transparent;
    background-color: #afafaf;
    box-shadow: 0;
    border-radius: 8px;
    transition: all .3s;
}

.toggle-switch + label:after {
    position: absolute;
    content: '';
    width: 14px;
    height: 14px;
    top: 1px;
    left: 1px;
    background-color: #fff;
    box-shadow: 0 2px 5px 0 rgba(51, 51, 51, .25);
    border-radius: 16px;
    transition: left .3s, right .3s;
}

.toggle-switch:checked + label:before {
    background-color: var(--compat-success);
    transition: all .3s;
}

.toggle-switch:checked + label:after {
    left: 15px;
    transition: left .3s, right .3s;
}

.toggle-switch:disabled + label { cursor: no-drop; }

.toggle-switch:disabled + label:before { opacity: .3; }

.form-group .toggle-switch + *,
.form-group .toggle-switch + *:before,
.form-group .toggle-switch + *:after {
    margin-top: 5px !important;
}

.panel-control > .toggle-switch + label { vertical-align: baseline; }

/* 14.2 单选框/复选框 .magic-radio / .magic-checkbox（Magic Check） */
input[type="radio"].magic-radio,
input[type="checkbox"].magic-checkbox {
    position: fixed;
    z-index: -50;
    top: -2000px;
}

.magic-radio[disabled],
.magic-checkbox[disabled] { cursor: not-allowed; }

.input-group-addon > .magic-radio + label,
.input-group-addon > .magic-checkbox + label { vertical-align: text-top; }

.input-group-addon > .magic-radio + label:before,
.input-group-addon > .magic-checkbox + label:before { left: 0; }

.magic-radio + label,
.magic-checkbox + label {
    cursor: pointer;
    display: inline-block;
    margin: 0;
    min-width: 1.34em;
    padding: 0;
    position: relative;
    vertical-align: middle;
}

.magic-radio + label:hover:before,
.magic-checkbox + label:hover:before {
    border-color: var(--compat-primary);
    transition: all .3s;
}

.magic-radio + label:before,
.magic-checkbox + label:before {
    border: 1px solid rgba(0, 0, 0, .15);
    box-shadow: 0 0 0 0 rgba(0, 0, 0, .07);
    content: '';
    display: block;
    height: 17px;
    left: 0;
    position: absolute;
    top: 0;
    width: 17px;
    transition: all .3s;
}

.magic-radio + label:after,
.magic-checkbox + label:after {
    content: '';
    display: none;
    position: absolute;
}

.magic-radio + label:not(:empty),
.magic-checkbox + label:not(:empty) {
    margin: 0 5px 0 0;
    text-indent: 25px;
}

.magic-checkbox + label {
    min-height: 17px;
    min-width: 17px;
}

.btn-group .magic-radio + label,
.btn-group .magic-checkbox + label {
    min-height: 1em;
    vertical-align: baseline;
}

.magic-radio[disabled] + label,
.magic-checkbox[disabled] + label {
    cursor: not-allowed;
    opacity: .5;
}

.magic-radio[disabled] + label:hover,
.magic-radio[disabled] + label:before,
.magic-radio[disabled] + label:after,
.magic-checkbox[disabled] + label:hover,
.magic-checkbox[disabled] + label:before,
.magic-checkbox[disabled] + label:after { cursor: not-allowed; }

.magic-radio:checked + label:after,
.magic-checkbox:checked + label:after { display: block; }

.magic-radio:focus + label:before,
.magic-checkbox:focus + label:before {
    box-shadow: 0 0 0 10px rgba(0, 0, 0, .1), inset 0 0 0 10px rgba(0, 0, 0, .1);
    transition: box-shadow .1s;
}

.magic-radio:checked:focus + label:before,
.magic-checkbox:checked:focus + label:before {
    box-shadow: 0 0 0 10px rgba(25, 118, 210, .17), inset 0 0 0 10px rgba(3, 169, 244, .17);
}

.magic-radio + label:before { border-radius: 50%; }

.magic-radio + label:after {
    background: var(--compat-primary);
    border-radius: 50%;
    height: 9px;
    left: 4px;
    top: 4px;
    width: 9px;
}

.magic-radio:checked + label:before { border: 2px solid var(--compat-primary); }

.magic-checkbox + label:before { border-radius: 2px; }

.magic-checkbox + label:after {
    border-color: #fff;
    border-style: solid;
    border-width: 0 2px 2px 0;
    box-sizing: border-box;
    height: 13px;
    left: 6px;
    top: 0;
    transform: rotate(48deg);
    width: 6px;
}

.magic-checkbox:focus + label:before { transition: all .3s; }

.magic-checkbox:checked + label:before {
    background: var(--compat-primary);
    border-color: var(--compat-primary);
}

/* 14.3 NanoScroller 滚动条（.nano 标记仍在使用，滚动条元素由旧插件生成） */
.nano > .nano-pane {
    background-color: rgba(0, 0, 0, .1);
    position: absolute;
    width: 4px;
    right: 0;
    top: 0;
    bottom: 0;
    opacity: 0;
    transition: all .7s;
}

.nano > .nano-pane > .nano-slider {
    background-color: rgba(25, 118, 210, .5);
    position: relative;
    margin: 0;
    border-radius: 0;
    opacity: .85;
}

.nano:hover > .nano-pane,
.nano-pane.active,
.nano-pane.flashed { opacity: .99; }

.has-scrollbar > .nano-content::-webkit-scrollbar { display: block; }

/* 14.4 Nifty 徽标本色（BS4 自带的 badge-* 里没有 purple/pink/default） */
.badge-purple { background-color: #ab47bc; }

.badge-pink { background-color: #f06292; }

.badge-default {
    background-color: #e9eeef;
    color: #7a878e;
}

/* 14.5 面板遮罩（加载中） */
.panel-overlay-wrap { position: relative; }

.panel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, .75);
    text-align: center;
    z-index: 795;
}

.panel-overlay-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--compat-text-strong);
}

.panel-overlay-icon {
    display: block;
    margin-bottom: 10px;
    font-size: 1.5em;
    line-height: 1;
}

.panel-overlay-title {
    margin: 0 0 5px;
    font-size: 15px;
    color: var(--compat-text-strong);
}

/* 14.6 面板控件（配合 bs4-nifty-core.js 的 PANEL REMOVAL）
   关闭按钮 [data-dismiss="panel"]：先 .remove 淡出，再由脚本 remove；
   全屏按钮 [data-panel="fullscreen"]：.fullscreen 撑满视口，body 锁滚动 */
.panel.remove,
.card.remove {
    opacity: 0;
    transition: opacity .25s;
}

.panel.fullscreen,
.card.fullscreen {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1200;
    margin: 0;
    border-radius: 0;
    overflow: auto;
}

body.panel-fullscreen {
    overflow: hidden;
}

.scroll-top.in:active {
    box-shadow: 0 0 10px rgba(0, 0, 0, .2) !important;
    transform: scale(1.05);
    transition: all .15s;
}

.scroll-top.in > i {
    display: block;
    width: 1em;
    height: 1em;
    line-height: 1.1em;
}

/* 步骤条禁止选中/手型（只能通过按钮或点击切换） */
.wz-nav-off > li a {
    cursor: default !important;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 14.7 无间距栅格：BS3 的 .row-no-gutters（BS4 改名为 .no-gutters 且只作用于 .row 的直接列）
   取值照抄 bootstrap3 的 .row-no-gutters，SQL 查询页的左右两栏靠它贴边布局 */
.row-no-gutters {
    margin-right: 0;
    margin-left: 0;
}

.row-no-gutters > [class*="col-"] {
    padding-right: 0;
    padding-left: 0;
}

/* 弹窗按钮：与页面其它按钮同高（30px），避免三连按钮显得又高又占地方 */
.modal-footer .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px !important;
    min-height: 0;
    padding: 0 14px;
    font-size: 13px;
    line-height: 1 !important;
    border-radius: 6px;
}

.modal-footer .btn + .btn {
    margin-left: 8px;
}

/* =============================================================================
   9. 弹窗内的控件尺寸
   -----------------------------------------------------------------------------
   bootbox / layer / sweetalert 的 DOM 都直接挂在 body 下，不在 .bs4-inner 里，
   内容页那套规则覆盖不到，这里单独声明。基线同为 30px：
   输入框 / 下拉框 / chosen / 按钮
   bootbox 的根节点就是 .modal（.bootbox.modal），所以输入框与 chosen 直接按
   .modal 作用域写，普通 Bootstrap 弹窗里的表单也能一起对齐；
   按钮另按各插件的类名单列（.btn / .layui-layer-btn / .swal-button）。
   ============================================================================= */

/* ---- 9.1 输入框 / 原生下拉框 ----
   高 30px、13px 字号、6px 圆角；line-height 取 28px（30px 减上下各 1px 边框），
   文字在框内垂直居中；vertical-align:middle 让同一行的输入框 / chosen / 按钮共用一条基线 */
.modal input.form-control:not([type='checkbox']):not([type='radio']),
.modal select.form-control:not([size]):not([multiple]),
.layui-layer input.layui-layer-input,
.layui-layer input.form-control:not([type='checkbox']):not([type='radio']),
.layui-layer select.form-control:not([size]):not([multiple]),
.swal-modal .swal-content__input,
.swal-modal .swal-content select {
    height: 30px;
    padding: 0 10px;
    font-size: 13px;
    line-height: 28px;
    color: #555;
    border: 1px solid var(--compat-border);
    border-radius: var(--compat-radius);
    box-shadow: none;
    vertical-align: middle;
    box-sizing: border-box;
}

/* 原生下拉框右侧给箭头留位置，否则文字会压到箭头上 */
.modal select.form-control:not([size]):not([multiple]),
.layui-layer select.form-control:not([size]):not([multiple]),
.swal-modal .swal-content select {
    padding-right: 26px;
}

/* 文本域只统一外观，不锁高度：.form-control 的 30px 会把它挤成一行 */
.modal textarea.form-control,
.layui-layer textarea.form-control,
.layui-layer textarea.layui-layer-input,
.swal-modal .swal-content__textarea {
    height: auto;
    min-height: 60px;
    padding: 6px 10px;
    line-height: 20px;
    border: 1px solid var(--compat-border);
    border-radius: var(--compat-radius);
    box-shadow: none;
    vertical-align: middle;
    box-sizing: border-box;
}

/* ---- 9.2 chosen 单选 / 多选：与输入框同高同圆角 ---- */
/* 单选：chosen 默认 25px + 渐变底 + 内阴影，箭头、清除按钮也都按 25px 写死 */
.modal .chosen-container-single .chosen-single,
.layui-layer .chosen-container-single .chosen-single,
.swal-modal .chosen-container-single .chosen-single {
    height: 30px;
    padding: 0 26px 0 10px;
    font-size: 13px;
    line-height: 28px;
    border: 1px solid var(--compat-border);
    border-radius: var(--compat-radius);
    background: #fff;
    box-shadow: none;
    vertical-align: middle;
    box-sizing: border-box;
}

.modal .chosen-container-single .chosen-single span,
.layui-layer .chosen-container-single .chosen-single span,
.swal-modal .chosen-container-single .chosen-single span {
    margin-right: 0;
    line-height: 28px;
}

/* 清除按钮(abbr)默认 top:6px，30px 高度下会偏上 */
.modal .chosen-container-single .chosen-single abbr,
.layui-layer .chosen-container-single .chosen-single abbr,
.swal-modal .chosen-container-single .chosen-single abbr {
    top: 50%;
    margin-top: -6px;
}

/* 箭头默认背景定位在 0 2px，改用 flex 居中，展开/收起两个状态都居中 */
.modal .chosen-container-single .chosen-single div,
.layui-layer .chosen-container-single .chosen-single div,
.swal-modal .chosen-container-single .chosen-single div {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 100%;
}

.modal .chosen-container-single .chosen-single div b,
.layui-layer .chosen-container-single .chosen-single div b,
.swal-modal .chosen-container-single .chosen-single div b {
    width: 18px;
    height: 18px;
    background-position: 0 0;
}

.modal .chosen-container-active.chosen-with-drop .chosen-single div b,
.layui-layer .chosen-container-active.chosen-with-drop .chosen-single div b,
.swal-modal .chosen-container-active.chosen-with-drop .chosen-single div b {
    background-position: -18px 0;
}

/* 多选：chosen 靠 float + 行盒撑高，min-height 管不住（实测被标签顶到 37px 以上），
   这里用 flex 接管排版：空态锁在 30px，选了多项后自然向下增行 */
.modal .chosen-container-multi .chosen-choices,
.layui-layer .chosen-container-multi .chosen-choices,
.swal-modal .chosen-container-multi .chosen-choices {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    min-height: 30px;
    height: auto;
    padding: 2px 8px;
    font-size: 13px;
    line-height: 1;
    border: 1px solid var(--compat-border);
    border-radius: var(--compat-radius);
    background: #fff;
    box-shadow: none;
    vertical-align: middle;
    box-sizing: border-box;
}

.modal .chosen-container-multi .chosen-choices li,
.layui-layer .chosen-container-multi .chosen-choices li,
.swal-modal .chosen-container-multi .chosen-choices li {
    float: none;
    margin: 1px 4px 1px 0;
    line-height: 20px;
}

.modal .chosen-container-multi .chosen-choices li.search-choice,
.layui-layer .chosen-container-multi .chosen-choices li.search-choice,
.swal-modal .chosen-container-multi .chosen-choices li.search-choice {
    padding: 2px 20px 2px 6px;
    max-width: 100%;
}

/* 标签的删除按钮默认 top:4px，标签压到 24px 后需要垂直居中 */
.modal .chosen-container-multi .chosen-choices li.search-choice .search-choice-close,
.layui-layer .chosen-container-multi .chosen-choices li.search-choice .search-choice-close,
.swal-modal .chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
    top: 50%;
    margin-top: -4px;
}

.modal .chosen-container-multi .chosen-choices li.search-field,
.layui-layer .chosen-container-multi .chosen-choices li.search-field,
.swal-modal .chosen-container-multi .chosen-choices li.search-field {
    flex: 1 1 auto;
    margin: 0;
    line-height: 20px;
}

.modal .chosen-container-multi .chosen-choices li.search-field input[type='text'],
.layui-layer .chosen-container-multi .chosen-choices li.search-field input[type='text'],
.swal-modal .chosen-container-multi .chosen-choices li.search-field input[type='text'] {
    height: 20px;
    margin: 0;
    padding: 0;
    line-height: 20px;
}

/* ---- 9.3 按钮：30px 高、6px 圆角、文字水平 + 垂直居中 ----
   插件各用自己的行高撑按钮（layer 28px、BS4 .btn 1.5、swal 1.65），文字普遍偏上；
   统一改成 inline-flex + center，行高归 1（行盒最小，居中完全交给 flex），
   white-space:nowrap 防止文字换行把 30px 的按钮撑高 */
.bootbox .btn,
.layui-layer .layui-layer-btn a,
.layui-layer .layui-layer-btn .layui-layer-btn0,
.layui-layer .layui-layer-btn .layui-layer-btn1,
.swal-modal .swal-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    min-height: 0;
    padding: 0 14px;
    font-size: 13px;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    border-radius: var(--compat-radius);
    vertical-align: middle;
    box-sizing: border-box;
}

/* 兜底：不支持 inline-flex 的环境退回 inline-block，用行盒居中
   （28px = 30px 减上下各 1px 边框），文字不至于贴在按钮顶部 */
@supports not (display: inline-flex) {
    .bootbox .btn,
    .layui-layer .layui-layer-btn a,
    .layui-layer .layui-layer-btn .layui-layer-btn0,
    .layui-layer .layui-layer-btn .layui-layer-btn1,
    .swal-modal .swal-button {
        display: inline-block;
        line-height: 28px;
    }
}

/* 按钮组里只有首尾两个角是圆的，避免上面的 border-radius 把中间的按钮也画圆 */
.bootbox .btn-group > .btn {
    border-radius: 0;
}

.bootbox .btn-group > .btn:first-child {
    border-radius: var(--compat-radius) 0 0 var(--compat-radius);
}

.bootbox .btn-group > .btn:last-child {
    border-radius: 0 var(--compat-radius) var(--compat-radius) 0;
}

/* 按钮配色对齐主题：取消=浅灰，确认=主色，dangerMode 时 swal 会给确认键追加
   .swal-button--danger 修改类，这里用语义危险色覆盖 */
.swal-modal .swal-button--cancel {
    background-color: #eff3f9;
    color: #47586e;
}

.swal-modal .swal-button--cancel:hover {
    background-color: #e3eaf4;
}

.swal-modal .swal-button--confirm {
    background-color: var(--compat-primary);
}

.swal-modal .swal-button--confirm:hover {
    background-color: var(--compat-primary-dark);
}

.swal-modal .swal-button--danger {
    background-color: var(--compat-danger);
}

.swal-modal .swal-button--danger:hover {
    background-color: var(--compat-danger-dark);
}
