@CHARSET "UTF-8";
/*!
 * admin_ui.css — 自建 UI 基础层（替代 Bootstrap 2 + flatlab bootstrap-reset）
 * ---------------------------------------------------------------------------
 * 为什么要自建：
 *   原项目同时引 bootstrap.min.css + bootstrap-reset(.css/_skymobi.css)，
 *   两套 reset 互相打架，且 flatlab 的重置（!important 满天飞）压住了后面
 *   所有样式。239 个模板、1300+ 处栅格类、500+ 处组件类都依赖它，
 *   继续叠覆盖层只会越来越难维护 —— 干脆把实际用到的部分自建一份。
 *
 * 只实现**项目真实在用**的组件，未用到的（navbar/carousel/模态框等）一律不写：
 *   栅格 .row .col-{xs,sm,md,lg}-*
 *   表单 .form-group .form-control .control-label .form-inline .form-horizontal
 *         .checkbox .radio .input-{sm,lg} .help-block
 *   按钮 .btn .btn-{xs,sm,lg,block} .btn-{default,primary,info,success,danger,warning}
 *   表格 .table .table-{striped,hover,bordered,condensed,responsive}
 *   分页 .pagination .pagination-{lg,sm} .active .disabled
 *   面板 .panel .panel-body .panel-heading .panel-footer
 *   工具 .clearfix .center .pull-{left,right} .hide .show .w30 .space15
 *
 * 视觉基准：D:\repos\server\ser_ad\www\css\admin.css
 *
 * 注意：flatlab 的 style.css **必须保留** —— 里面的 icon-*/fa 图标字形、
 * 图表样式、jquery.jspanel 依赖它。本文件不接管图标，只管布局与控件外观。
 */


/* ==========================================================================
   0. 设计令牌
   ========================================================================== */
:root{
    --ui-blue:        #16a34a;
    --ui-blue-light:  #22c55e;
    --ui-blue-pale:   #ecfdf5;
    --ui-blue-paler:  #f0fdf4;
    --ui-green:        #16a34a;
    --ui-red:          #dc2626;
    --ui-red-soft:     #f04438;
    --ui-orange:       #d97706;
    --ui-text:         #2c3340;
    --ui-text-sub:     #6b7280;
    --ui-text-mute:    #8a94a6;
    --ui-text-faint:   #9aa3b2;
    --ui-border:       #eef0f4;
    --ui-border-2:     #f0f2f5;
    --ui-border-3:     #e7eaf0;
    --ui-bg:           #f5f7fa;
    --ui-gray-bg:      #f4f6f9;
    --ui-radius:       9px;
    --ui-radius-lg:    12px;
    --ui-shadow:       0 1px 3px rgba(16,24,40,.04);
    --ui-shadow-lg:    0 8px 26px rgba(16,24,40,.1);
    --ui-topbar-h:     56px;
}


/* ==========================================================================
   1. Reset
   ========================================================================== */
*,*::before,*::after{box-sizing:border-box;}
html{
    font-size:14px;
    -webkit-text-size-adjust:100%;
    -webkit-tap-highlight-color:rgba(0,0,0,0);
}
body{
    margin:0;
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC",
        "Hiragino Sans GB","Microsoft YaHei",sans-serif;
    font-size:14px;
    line-height:1.5;
    color:var(--ui-text);
    background:var(--ui-bg);
    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
}
h1,h2,h3,h4,h5,h6{
    margin:0 0 10px;
    font-weight:600;
    line-height:1.3;
    color:#1f2733;
}
p{margin:0 0 10px;}
a{
    color:var(--ui-blue);
    text-decoration:none;
    transition:color .15s;
}
a:hover{color:#15803d;}
a:focus-visible{
    outline:2px solid var(--ui-blue-light);
    outline-offset:2px;
}
img{border:0;vertical-align:middle;max-width:100%;height:auto;}
ul,ol{margin:0;padding:0;list-style:none;}
dl,dd,figure{margin:0;}
hr{
    margin:16px 0;
    border:0;
    border-top:1px solid var(--ui-border);
}
abbr[title]{border-bottom:1px dotted var(--ui-text-mute);cursor:help;}

button,input,select,textarea{
    font-family:inherit;
    font-size:inherit;
    line-height:inherit;
    margin:0;
}
/* ⚠️ 这里不能用 `background:none` 简写 —— 它会把 background-color 重置为
   transparent（computed 值 initial），与后面 .btn 的 background-color 叠加时
   表现为「按钮底色被清掉」。改成只重置必要的属性，且用 background-color:transparent。
   同理 border:0 会清掉 border-style，改成 border:0 solid transparent 等价写法。 */
button{
    background-color:transparent;
    border:0 solid transparent;
    cursor:pointer;
}
input[type="submit"]{cursor:pointer;}

/* 滚动条 */
::-webkit-scrollbar{width:9px;height:9px;}
::-webkit-scrollbar-track{background:#eef2f7;}
::-webkit-scrollbar-thumb{background:#c8d3e0;border-radius:5px;border:2px solid #eef2f7;}
::-webkit-scrollbar-thumb:hover{background:#a9b8ca;}


/* ==========================================================================
   2. 栅格 —— 覆盖项目在用的 xs/sm/md/lg
   ========================================================================== */
/* 外层 gutter：与 bootstrap 一致 15px，页面里靠 .row 的负 margin 抵消 */
.row{
    margin:0 -15px;
    /* 项目里大量 .row 后面直接跟内容，负 margin 会贴边，
       用 padding 补回来，内容仍然从 0 开始 */
    padding:0;
}
/* clearfix：项目多处用 row 包裹浮动栅格，必须撑开高度 */
.row:before,
.row:after{
    content:" ";
    display:table;
}
.row:after{clear:both;}

[class*="col-"]:not(td):not(th){float:left;position:relative;min-height:1px;padding:0 15px;}

/* sm 断点 ≥768px：项目最常用 */
@media (min-width:768px){
    .col-sm-1  {width:8.333333%;}
    .col-sm-2  {width:16.666667%;}
    .col-sm-3  {width:25%;}
    .col-sm-4  {width:33.333333%;}
    .col-sm-5  {width:41.666667%;}
    .col-sm-6  {width:50%;}
    .col-sm-7  {width:58.333333%;}
    .col-sm-8  {width:66.666667%;}
    .col-sm-9  {width:75%;}
    .col-sm-10 {width:83.333333%;}
    .col-sm-11 {width:91.666667%;}
    .col-sm-12 {width:100%;}
    /* offset */
    .col-sm-offset-1  {margin-left:8.333333%;}
    .col-sm-offset-2  {margin-left:16.666667%;}
    .col-sm-offset-3  {margin-left:25%;}
    .col-sm-offset-4  {margin-left:33.333333%;}
    .col-sm-offset-5  {margin-left:41.666667%;}
    .col-sm-offset-6  {margin-left:50%;}
    .col-sm-offset-8  {margin-left:66.666667%;}
    .col-sm-offset-9  {margin-left:75%;}
    .col-sm-offset-10 {margin-left:83.333333%;}
    .col-sm-offset-11 {margin-left:91.666667%;}
    .col-sm-offset-12 {margin-left:100%;}
}
/* md ≥992px */
@media (min-width:992px){
    .col-md-1  {width:8.333333%;}
    .col-md-2  {width:16.666667%;}
    .col-md-3  {width:25%;}
    .col-md-4  {width:33.333333%;}
    .col-md-5  {width:41.666667%;}
    .col-md-6  {width:50%;}
    .col-md-7  {width:58.333333%;}
    .col-md-8  {width:66.666667%;}
    .col-md-9  {width:75%;}
    .col-md-10 {width:83.333333%;}
    .col-md-11 {width:91.666667%;}
    .col-md-12 {width:100%;}
}
/* lg ≥1200px：项目里 col-lg-* 极多，且多数在 lg 下才生效 */
@media (min-width:1200px){
    .col-lg-1  {width:8.333333%;}
    .col-lg-2  {width:16.666667%;}
    .col-lg-3  {width:25%;}
    .col-lg-4  {width:33.333333%;}
    .col-lg-5  {width:41.666667%;}
    .col-lg-6  {width:50%;}
    .col-lg-7  {width:58.333333%;}
    .col-lg-8  {width:66.666667%;}
    .col-lg-9  {width:75%;}
    .col-lg-10 {width:83.333333%;}
    .col-lg-11 {width:91.666667%;}
    .col-lg-12 {width:100%;}
    .col-lg-offset-1  {margin-left:8.333333%;}
    .col-lg-offset-2  {margin-left:16.666667%;}
    .col-lg-offset-3  {margin-left:25%;}
}
/* xs：bootstrap 的 xs 不带媒体查询，最小屏也要占满/按比例 */
.col-xs-1  {width:8.333333%;}
.col-xs-2  {width:16.666667%;}
.col-xs-3  {width:25%;}
.col-xs-4  {width:33.333333%;}
.col-xs-5  {width:41.666667%;}
.col-xs-6  {width:50%;}
.col-xs-7  {width:58.333333%;}
.col-xs-8  {width:66.666667%;}
.col-xs-9  {width:75%;}
.col-xs-10 {width:83.333333%;}
.col-xs-11 {width:91.666667%;}
.col-xs-12 {width:100%;}


/* ==========================================================================
   3. 布局工具类
   ========================================================================== */
.clearfix:before,
.clearfix:after{content:" ";display:table;}
.clearfix:after{clear:both;}

/* 排除表格单元格：td.center 若变 display:block 会脱离表格行布局导致整行错乱 */
.center:not(td):not(th){display:block;margin-left:auto;margin-right:auto;text-align:center;}
td.center,th.center{display:table-cell;text-align:center;}
.center-text{text-align:center;}
.pull-left{float:left !important;}
.pull-right{float:right !important;}
.hide{display:none !important;}
.show{display:block !important;}
.invisible{visibility:hidden;}

.w30{width:30px;}
.w50{width:50px;}
.w80{width:80px;}
.w100{width:100px;}
.w150{width:150px;}
/* 项目自定义的间距类 */
.space5{margin:5px;}
.space10{margin:10px;}
.space15{margin:15px;}
.space20{margin:20px;}
.space30{margin:30px;}
.mt5{margin-top:5px;}
.mt10{margin-top:10px;}
.mt15{margin-top:15px;}
.mb5{margin-bottom:5px;}
.mb10{margin-bottom:10px;}
.mb15{margin-bottom:15px;}
.mb20{margin-bottom:20px;}
.ml5{margin-left:5px;}
.ml10{margin-left:10px;}
.mr5{margin-right:5px;}
.mr10{margin-right:10px;}


/* ==========================================================================
   4. 面板 / 卡片
   ========================================================================== */
.panel{
    background:#fff;
    border:1px solid var(--ui-border-2);
    border-radius:var(--ui-radius-lg);
    box-shadow:var(--ui-shadow);
    margin-bottom:18px;
    /* ser_ad：面板自身不滚动，内部表格滚动时底部栏不被带走 */
    display:flex;
    flex-direction:column;
    min-height:0;
}
.panel-body{
    padding:18px 20px;
    min-height:0;
}
.panel-body2{padding:14px 16px;}
.panel-heading{
    padding:14px 20px;
    border-bottom:1px solid var(--ui-border);
    font-size:15px;
    font-weight:600;
    color:#1f2733;
}
.panel-footer{
    padding:12px 20px;
    border-top:1px solid var(--ui-border);
    background:#fafbfc;
}
/* 统计卡：项目里 .cll1 由页面内联定义，这里给统一外观 */
.cll1{
    background:#fff;
    border:1px solid var(--ui-border-2);
    border-radius:var(--ui-radius-lg);
    box-shadow:var(--ui-shadow);
    padding:18px 20px;
    transition:box-shadow .18s,transform .18s;
}
.cll1:hover{
    box-shadow:0 6px 16px rgba(16,24,40,.08);
    transform:translateY(-2px);
}
.cl101{color:var(--ui-text-mute);font-size:13px;margin-bottom:8px;}
.cl102{
    color:var(--ui-blue);
    font-size:26px;
    font-weight:700;
    line-height:1.2;
    letter-spacing:-.3px;
}
.cl102.is-zero{color:#c3cad6;}


/* ==========================================================================
   5. 表单
   ========================================================================== */
.form-group{
    margin-bottom:16px;
    /* bootstrap 的 clearfix，栅格包裹时需要 */
}
.form-group:before,
.form-group:after{content:" ";display:table;}
.form-group:after{clear:both;}

.control-label{
    display:block;
    margin-bottom:6px;
    font-size:13px;
    font-weight:400;
    color:var(--ui-text-sub);
}
.form-control{
    display:block;
    width:100%;
    height:34px;
    padding:6px 11px;
    font-size:13px;
    color:var(--ui-text);
    background-color:#fff !important;
    border-width:1px !important;
    border-style:solid !important;
    border-color:#e0e4ec !important;
    border-radius:7px;
    box-shadow:none !important;
    transition:border-color .15s,box-shadow .15s;
    appearance:none;
}
.form-control:hover{border-color:#d0d7e2;}
.form-control:focus{
    outline:none;
    border-color:var(--ui-blue-light);
    box-shadow:0 0 0 3px rgba(59,130,246,.13);
}
.form-control::placeholder{color:var(--ui-text-faint);}
textarea.form-control{
    height:auto;
    min-height:70px;
    line-height:1.6;
    resize:vertical;
}
/* 禁用/只读 */
.form-control[disabled],
.form-control[readonly],
fieldset[disabled] .form-control{
    background:#f7f8fa;
    color:var(--ui-text-mute);
    cursor:not-allowed;
}
/* 原生 select 需要自己画箭头 */
select.form-control{
    padding-right:28px;
    background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%238a94a6'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat:no-repeat;
    background-position:right 9px center;
    background-size:14px;
    cursor:pointer;
}
input[type="text"],input[type="password"],input[type="email"],
input[type="number"],input[type="date"],input[type="search"],
input[type="tel"],input[type="url"]{height:34px;}
input[type="date"]{padding-right:8px;}

/* 尺寸变体 */
.input-sm,
.form-control.input-sm{height:28px;padding:4px 9px;font-size:12px;}
.input-lg,
.form-control.input-lg{height:42px;padding:9px 14px;font-size:15px;}

/* help block / 提示 */
.help-block{
    display:block;
    margin-top:5px;
    font-size:12px;
    color:var(--ui-text-mute);
}
.has-error .form-control{border-color:var(--ui-red);}
.has-error .help-block{color:var(--ui-red);}

/* 水平表单：label 左，控件右 */
.form-horizontal .form-group{
    display:flex;
    align-items:flex-start;
    gap:12px;
}
.form-horizontal .control-label{
    flex:0 0 auto;
    width:120px;
    padding-top:7px;
    margin-bottom:0;
    text-align:right;
}
.form-horizontal .form-control{flex:1 1 auto;min-width:0;}
/* 栅格包裹的 form-group 不参与 flex（bootstrap 里它们是 block） */
.form-horizontal [class*="col-"] > .form-group{display:block;}
.form-horizontal [class*="col-"] > .control-label{
    width:auto;text-align:left;padding-top:0;
}

/* 行内表单：搜索栏大量使用 */
.form-inline .form-group{
    display:inline-flex;
    align-items:center;
    vertical-align:middle;
    margin-bottom:0;
    margin-right:10px;
}
.form-inline .control-label{
    margin-bottom:0;
    margin-right:6px;
    white-space:nowrap;
}
.form-inline .form-control{
    display:inline-block;
    width:auto;
    min-width:120px;
    vertical-align:middle;
}

/* 勾选/单选 */
.checkbox,
.radio{
    position:relative;
    display:inline-block;
    padding-left:22px;
    margin:0 8px 0 0;
    font-size:13px;
    line-height:20px;
    color:var(--ui-text-sub);
    cursor:pointer;
    vertical-align:middle;
}
.checkbox input,
.radio input{
    position:absolute;
    left:0;
    top:2px;
    margin:0;
    width:15px;height:15px;
    cursor:pointer;
}
.checkbox input[type="checkbox"],
.radio input[type="radio"]{
    appearance:none;
    background:#fff;
    border:1px solid #d0d7e2;
    border-radius:4px;
    transition:all .15s;
}
.radio input[type="radio"]{border-radius:50%;}
.checkbox input[type="checkbox"]:checked{
    background:var(--ui-blue) url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3E%3Cpath d='M6.2 11.5L3 8.3l1.1-1.1 2.1 2.1 5-5L12.3 5.4z'/%3E%3C/svg%3E") center/13px no-repeat;
    border-color:var(--ui-blue);
}
.radio input[type="radio"]:checked{
    border-color:var(--ui-blue);
    box-shadow:inset 0 0 0 3px #fff;
    background:var(--ui-blue);
}
.checkbox input:focus-visible,
.radio input:focus-visible{
    outline:2px solid var(--ui-blue-light);
    outline-offset:1px;
}
.checkbox.disabled,
.radio.disabled{
    color:var(--ui-text-faint);
    cursor:not-allowed;
}
.checkbox.disabled input,
.radio.disabled input{cursor:not-allowed;opacity:.55;}


/* ==========================================================================
   5.5 表格内操作列按钮的**布局**（外观见 8.5）
   --------------------------------------------------------------------------
   为什么必须显式处理：
   列表页模板的操作列里，多个 <a class="btn btn-info btn-xs"> 之间
   **既没有换行符也没有分隔符**，原本靠 bootstrap 的表现正常竖排。
   自建 CSS 里 .btn 是 inline-block，于是全部挤在同一行互相吞掉
   （实测：广告位/Gtag/Ads.txt 只剩最后一个可见）。
   ⚠️ 用 flex 而不是 block+margin：
      block 让每个按钮各占一个行盒，按钮自带 height（.btn 默认 34px）
      会把行高累加到 34*n —— 实测 adlist 页行高被撑到近 200px。
      flex 按内容高度紧凑排列，不会互相叠加。
   ⚠️ width:fit-content：block/flex 默认会被拉满整列（操作列常 200px+）。
   状态标记 <span class="btn"> 必须排除，否则表格被撑高。 */
#main-content table td .btn{
    display:flex;
    align-items:center;
    width:fit-content;
    max-width:100%;
    height:auto;          /* 交由 padding + line-height 决定高度 */
    /* 间距压到 3px：操作列常有 5~6 个按钮，
       5px 间距在 adlist 这类页面会把行高额外撑出 30px */
    margin:0 0 3px;
    padding:3px 9px;
    font-size:11.5px;
    line-height:1.55;
}
#main-content table td .btn:last-child{margin-bottom:0;}
#main-content table td span.btn{
    display:inline-flex;
    width:auto;
    height:auto;
    margin:0;
}


/* ==========================================================================
   6. 按钮
   ========================================================================== */
.btn{
    display:inline-block;
    height:34px;
    padding:0 14px;
    font-size:13px;
    font-weight:400;
    line-height:32px;
    text-align:center;
    white-space:nowrap;
    vertical-align:middle;
    color:var(--ui-text-sub) !important;
    /* 必须写全 background-color / border-width / border-style，且加 !important：
       后加载的 flatlab style.css（782 条规则）里有把按钮
       background 置 transparent、border-style 置 none 的清零规则，
       不加 !important 会出现「白字 + 透明底 = 按钮整个看不见」。 */
    background-color:#fff !important;
    border-width:1px !important;
    border-style:solid !important;
    border-color:var(--ui-border-3) !important;
    border-radius:7px;
    cursor:pointer;
    user-select:none;
    transition:all .15s ease;
}
.btn:hover{
    color:var(--ui-blue) !important;
    background-color:var(--ui-blue-paler) !important;
    border-color:#c7d2fe !important;
}
.btn:active{transform:translateY(1px);}
.btn:focus-visible{
    outline:none;
    box-shadow:0 0 0 3px rgba(59,130,246,.18);
}
.btn[disabled],
.btn.disabled{
    opacity:.55;
    cursor:not-allowed;
    transform:none;
}
.btn-sm{height:28px;padding:0 10px;font-size:12px;line-height:26px;border-radius:6px;}
.btn-lg{height:42px;padding:0 18px;font-size:15px;line-height:40px;border-radius:8px;}
.btn-xs{
    height:24px;padding:0 8px;
    font-size:11.5px;line-height:22px;border-radius:5px;
}
.btn-block{
    display:block;
    width:100%;
}

/* 变体：统一用 background-color + !important。
   ⚠️ 必须 !important：后加载的 flatlab style.css（782 条规则）里有
   `button { background: transparent }` 类的清零规则，会把按钮底色抹掉，
   实测查询按钮曾出现「白字 + 透明底」= 完全看不见。
   边框同理，必须写全 border-width/style/color 三属性。 */
.btn-primary,
.btn-info{
    color:#fff !important;
    background-color:var(--ui-blue) !important;
    border-color:var(--ui-blue) !important;
}
.btn-primary:hover,
.btn-info:hover{
    color:#fff !important;
    background-color:#15803d !important;
    border-color:#15803d !important;
}
.btn-success{
    color:#fff !important;
    background-color:var(--ui-green) !important;
    border-color:var(--ui-green) !important;
}
.btn-success:hover{
    color:#fff !important;background-color:#15803d !important;border-color:#15803d !important;
}
.btn-danger{
    color:var(--ui-red-soft) !important;
    background-color:#fff !important;
    border-color:#f4d3d0 !important;
}
.btn-danger:hover{
    color:#d92d20 !important;background-color:#fef3f2 !important;border-color:var(--ui-red-soft) !important;
}
.btn-warning{
    color:#fff !important;
    background-color:var(--ui-orange) !important;
    border-color:var(--ui-orange) !important;
}
.btn-warning:hover{
    color:#fff !important;background-color:#b45309 !important;border-color:#b45309 !important;
}

/* ⚠️ 补丁：筛选区的查询按钮
   列表页的搜索按钮是裸 <button class="btn btn-info">（无 form-control 等类），
   而 flatlab 的 style-responsive.css 里有针对窄屏的 `button{background:none!important}`
   之类的规则，它在 admin_ui.css **之后**加载，会把按钮底色清掉。
   这里用「元素+类」双选择器提高特异性锁定底色。 */
button.btn,
button.btn-info,
button.btn-primary,
input.btn,
a.btn{
    background-image:none !important;
}
form button.btn-info,
form .btn-group button.btn-info,
.form-inline button.btn-info{
    color:#fff !important;
    background-color:var(--ui-blue) !important;
    border-color:var(--ui-blue) !important;
}
form button.btn-info:hover{
    background-color:#15803d !important;
    border-color:#15803d !important;
}

/* 按钮组 */
.btn-group{
    display:inline-flex;
    vertical-align:middle;
    gap:0;
}
.btn-group > .btn{
    border-radius:0;
    margin-left:-1px;
}
.btn-group > .btn:first-child{
    border-top-left-radius:7px;
    border-bottom-left-radius:7px;
    margin-left:0;
}
.btn-group > .btn:last-child{
    border-top-right-radius:7px;
    border-bottom-right-radius:7px;
}

/* 下拉 */
.dropdown{position:relative;display:inline-block;}
.dropdown-toggle{cursor:pointer;}
.dropdown-menu{
    position:absolute;
    top:100%;
    left:0;
    z-index:1000;
    min-width:160px;
    margin-top:6px;
    padding:5px 0;
    background:#fff;
    border:1px solid var(--ui-border);
    border-radius:10px;
    box-shadow:var(--ui-shadow-lg);
    list-style:none;
    display:none;
}
.dropdown.open > .dropdown-menu,
.dropdown-menu.show{display:block;}
.dropdown-menu > li > a{
    display:block;
    padding:8px 14px;
    font-size:13px;
    color:var(--ui-text-sub);
    white-space:nowrap;
    transition:background .15s,color .15s;
}
.dropdown-menu > li > a:hover{
    background:var(--ui-blue-paler);
    color:var(--ui-blue);
}
.dropdown-menu > li.disabled > a{color:var(--ui-text-faint);cursor:not-allowed;}


/* ==========================================================================
   7. 表格
   ========================================================================== */
.table{
    width:100%;
    max-width:100%;
    margin-bottom:0;
    background:#fff;
    border-collapse:separate;
    border-spacing:0;
    font-size:13px;
    color:var(--ui-text-sub);
}
.table > thead > tr > th{
    padding:11px 12px;
    font-size:12.5px;
    font-weight:600;
    color:var(--ui-text-sub);
    text-align:left;
    white-space:nowrap;
    background:#fafbfc;
    border-bottom:1px solid var(--ui-border-2);
    border-top:0;
    vertical-align:middle;
}
.table > tbody > tr > td{
    padding:10px 12px;
    line-height:1.6;
    border-top:1px solid var(--ui-border-2);
    vertical-align:middle;
}
/* 无表头时首个 td 不要顶边 */
.table > tbody > tr:first-child > td{border-top:0;}
/* 表头首尾去圆角 */
.table > thead > tr > th:first-child{border-left:0;}
.table > thead > tr > th:last-child{border-right:0;}

.table-striped > tbody > tr:nth-of-type(odd){
    background:#fbfcfe;
}
.table-striped > tbody > tr:nth-of-type(odd):hover{
    background:#f8fafc;
}
.table-hover > tbody > tr:hover{
    background:#f8fafc;
}
.table-bordered,
.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > td{
    border:1px solid var(--ui-border-2);
}
.table-condensed > thead > tr > th,
.table-condensed > tbody > tr > td{padding:6px 8px;}

/* 项目里表格都包在白底 div 里，容器给圆角 */
.table-responsive{
    width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
}

/* 状态色 */
.c-green{color:var(--ui-green);}
.c-red{color:var(--ui-red);}
.c-gray{color:var(--ui-text-mute);}
.c-blue{color:var(--ui-blue);}


/* ==========================================================================
   8. 表格滚动容器（ser_ad .table-scroll 模式）
   --------------------------------------------------------------------------
   要点：
   1. 表头 sticky 吸顶
   2. 首列 sticky 固定（横向滚动时保持可见）
   3. 表头首列交叉点 z-index 最高
   4. max-height 用 calc 跟随视口，仅内容超出才出现滚动条
   ========================================================================== */
.table-scroll{
    width:100%;
    max-height:calc(100vh - 348px);
    overflow:auto;
    background:#fff;
    border:1px solid var(--ui-border-2);
    border-radius:var(--ui-radius-lg);
    box-shadow:var(--ui-shadow);
    /* 表格内部滚动时，底部批量栏/分页栏留在面板底部不被带走 */
    flex:1;
    min-height:0;
}
.table-scroll > .table{
    border-collapse:separate;
    border-radius:0;
    border:0;
    min-width:100%;
    box-shadow:none;
}
/* 表头吸顶 */
.table-scroll > .table > thead > tr > th{
    position:sticky;
    top:0;
    z-index:2;
    background:#fafbfc;
}
/* 首列固定 */
.table-scroll > .table > thead > tr > th:first-child,
.table-scroll > .table > tbody > tr > td:first-child{
    position:sticky;
    left:0;
    z-index:1;
}
.table-scroll > .table > thead > tr > th:first-child{
    background:#fafbfc;
    border-right:1px solid #e5e9f2;
    z-index:3;
}
.table-scroll > .table > tbody > tr > td:first-child{
    background:#fff;
    border-right:1px solid var(--ui-border-2);
}
/* 斑马纹下首列底色要跟着变，否则固定列会露出错色 */
.table-scroll > .table-striped > tbody > tr:nth-of-type(odd) > td:first-child{
    background:#fbfcfe;
}
.table-scroll > .table-hover > .table tbody > tr:hover > td:first-child,
.table-scroll > .table-striped > .table > tbody > tr:nth-of-type(odd):hover > td:first-child{
    background:#f8fafc;
}
/* 首列为复选框时定宽，避免横向滚动时列宽跳动 */
.table-scroll .col-check{width:46px;min-width:46px;}
.col-id{width:60px;min-width:60px;text-align:center;}


/* ==========================================================================
   8.5 操作列按钮外观
   --------------------------------------------------------------------------
   ⚠️ 必须显式写全 border 三属性。
   只写 border-color 不够 —— flatlab style.css（在本文件之后加载）
   里有规则把按钮的 border-style 置为 none，
   此时 border-width 计算为 0，只改颜色边框永远不显示。
   同理 background 要写 background-color，background 被置空时才会生效。
   ========================================================================== */
/* 尺寸/间距由 5.5 节统一控制，这里只管配色与边框 */
#main-content table td .btn{
    border-radius:6px;
    text-align:left;
    border-width:1px;
    border-style:solid;
    transition:all .15s ease;
}
/* 主要操作：淡蓝底蓝字，hover 反色 */
#main-content table td .btn-info,
#main-content table td .btn-primary{
    color:var(--ui-blue) !important;
    background-color:var(--ui-blue-paler) !important;
    border-color:#c7d2fe !important;
}
#main-content table td .btn-info:hover,
#main-content table td .btn-primary:hover{
    color:#fff !important;
    background-color:var(--ui-blue) !important;
    border-color:var(--ui-blue) !important;
}
/* 次要操作：白底描边 */
#main-content table td .btn-white,
#main-content table td .btn-default{
    color:var(--ui-text-sub) !important;
    background-color:#fff !important;
    border-color:var(--ui-border-3) !important;
}
#main-content table td .btn-white:hover,
#main-content table td .btn-default:hover{
    color:var(--ui-blue) !important;
    background-color:var(--ui-blue-paler) !important;
    border-color:#c7d2fe !important;
}
/* 危险操作 */
#main-content table td .btn-danger{
    color:var(--ui-red-soft) !important;
    background-color:#fff !important;
    border-color:#f4d3d0 !important;
}
#main-content table td .btn-danger:hover{
    color:#d92d20 !important;
    background-color:#fef3f2 !important;
    border-color:var(--ui-red-soft) !important;
}
/* 状态标记（span.btn）不加边框，避免表格出现大量方框 */
#main-content table td span.btn{
    border-width:0;
    border-style:none;
}
/* 表格里的图标按钮：方形紧凑 */



/* ==========================================================================
   9. 分页
   ========================================================================== */
.pagination{
    display:inline-flex;
    align-items:center;
    gap:4px;
    margin:0;
    padding:0;
}
.pagination > li{
    display:inline-block;
}
.pagination > li > a,
.pagination > li > span{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:30px;
    height:30px;
    padding:0 8px;
    font-size:12.5px;
    color:var(--ui-text-sub);
    background:#fff;
    border:1px solid var(--ui-border-3);
    border-radius:6px;
    transition:all .15s;
}
.pagination > li > a:hover{
    color:var(--ui-blue);
    background:var(--ui-blue-paler);
    border-color:#c7d2fe;
}
.pagination > li.active > a,
.pagination > li.active > span{
    color:#fff;
    background:var(--ui-blue);
    border-color:var(--ui-blue);
    font-weight:600;
}
.pagination > li.disabled > a,
.pagination > li.disabled > span{
    color:var(--ui-text-faint);
    background:#fafbfc;
    cursor:not-allowed;
    pointer-events:none;
}
.pagination-lg > li > a,
.pagination-lg > li > span{height:36px;min-width:36px;font-size:13px;}
.pagination-sm > li > a,
.pagination-sm > li > span{height:26px;min-width:26px;font-size:12px;padding:0 6px;}


/* ==========================================================================
   10. 其他项目内自定义组件
   ========================================================================== */
/* 上传控件 */
.picinput{
    display:inline-flex;
    align-items:center;
    gap:6px;
}
/* tooltip 触发元素 */
.tooltips{cursor:help;}
/* 可编辑表格容器 */
.editable-table{width:100%;}
/* 高级搜索区 */
.tasi-form{
    background:#fff;
    border:1px solid var(--ui-border-2);
    border-radius:var(--ui-radius-lg);
    padding:16px 18px;
    margin-bottom:16px;
    box-shadow:var(--ui-shadow);
}
/* DataTables 包裹层 */
.adv-table{
    background:#fff;
    border:1px solid var(--ui-border-2);
    border-radius:var(--ui-radius-lg);
    overflow:hidden;
    box-shadow:var(--ui-shadow);
    margin-bottom:18px;
}
/* 标签 / 徽标 */
.tag,.badge{
    display:inline-block;
    padding:3px 10px;
    font-size:12px;
    line-height:1.6;
    border-radius:20px;
    vertical-align:middle;
}
.tag-green,.badge-on,.tag-on{background:#e6f7ed;color:#16a34a;}
.tag-red,.badge-off,.tag-off{background:#fdeceb;color:#dc2626;}
.tag-orange{background:#fff3e0;color:#d97706;}
.tag-gray{background:#eef0f3;color:#6b7280;}
.tag-blue{background:var(--ui-blue-pale);color:var(--ui-blue);}


/* ==========================================================================
   10.2 把既有列表页接入滚动容器（ser_ad 模式，零模板改动）
   --------------------------------------------------------------------------
   项目里每个列表页的表格结构都是：
     <div class="adv-table editable-table">
       <div class="space15"></div>
       <section id="no-more-tables"><table class="table ...">...</table></section>
   直接把 .adv-table 当滚动容器用，**不用改任何模板**就能得到：
     - 表头 sticky 吸顶
     - 首列 sticky 固定
     - 仅内容超出才出滚动条（max-height 用 calc 跟随视口）
     - 底部批量栏/分页栏留在面板不被带走
   ========================================================================== */
#main-content .adv-table{
    position:relative;
    max-height:calc(100vh - 348px);
    overflow:auto;
    background:#fff;
    /* 抵消模板里 .space15 的空隙，让表格顶到容器边 */
    padding-top:0;
}
#main-content .adv-table > .space15{
    display:none;
}
#main-content .adv-table table.table{
    margin:0;
}
#main-content .adv-table table.table thead th{
    position:sticky;
    top:0;
    z-index:3;
    background:#fafbfc;
}
#main-content .adv-table table.table thead th:first-child,
#main-content .adv-table table.table tbody td:first-child{
    position:sticky;
    left:0;
}
/* 表头首列交叉点：既要吸顶又要固定，放最上层 */
#main-content .adv-table table.table thead th:first-child{z-index:5;}
#main-content .adv-table table.table tbody td:first-child{
    background:#fff;
    border-right:1px solid var(--ui-border-2);
    /* 首列固定时要有确定宽度，否则内容短的行会在右侧露出"空洞" */
    min-width:78px;
    width:78px;
}
/* 首列内容：ID 类数字左对齐即可，不要额外缩进 */
#main-content .adv-table table.table tbody td:first-child,
#main-content .adv-table table.table thead th:first-child{
    text-align:left;
}
/* 斑马纹/hover 时固定列底色要跟着变，否则会露出错色 */
#main-content .adv-table table.table-striped tbody tr:nth-of-type(odd) td:first-child{
    background:#fbfcfe;
}
#main-content .adv-table table.table-hover tbody tr:hover td:first-child,
#main-content .adv-table table.table-striped tbody tr:nth-of-type(odd):hover td:first-child{
    background:#f8fafc;
}
/* 操作列宽内容多，固定在右侧会更好用 */
#main-content .adv-table table.table td:last-child,
#main-content .adv-table table.table th:last-child{
    white-space:nowrap;
}


/* ==========================================================================
   11. 响应式：窄屏栅格转块
   ========================================================================== */
@media (max-width:767px){
    /* 项目里栅格用得极多（col-sm-2 有 960 处），窄屏全部堆叠 */
    [class*="col-"]:not(td):not(th){width:100%;float:none;}
    .row{margin:0;}
    [class*="col-"] > .form-group{margin-bottom:14px;}
    .form-horizontal .control-label{
        width:auto;text-align:left;padding-top:0;margin-bottom:6px;
    }
    .form-horizontal .form-group{display:block;}
    .hide-xs{display:none !important;}
    .form-inline .form-group{
        display:flex;width:100%;margin-right:0;
    }
    .form-inline .form-control{min-width:0;}
    .table-scroll{max-height:none;}
    /* 窄屏放开高度限制，避免小屏里表格区域只剩一条缝 */
    #main-content .adv-table{max-height:none;}
    .panel-body{padding:14px;}
}


/* ==========================================================================
   12. 打印
   ========================================================================== */
@media print{
    #sidebar,#headercon,footer.site-footer,.btn-group,.hide-print{display:none !important;}
    #main-content{margin-left:0 !important;padding:0 !important;}
    .table-scroll{max-height:none;overflow:visible;}
    .panel,.table-scroll{box-shadow:none;border-color:#ddd;}
    body{background:#fff;}
}