/**
 * SmartTable - 在线智能表格组件样式
 * 依赖：smart-table.js
 * 风格：ai-editor 简洁系（#1F1F1F 主色 / #ECECEC 分隔线 / 6px 圆角）
 */

/* ========== 容器 ========== */
.st-wrap {
    position: relative;
    background: #fff;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    color: #1F1F1F;
    box-sizing: border-box;
}
.st-wrap *, .st-wrap *::before, .st-wrap *::after { box-sizing: border-box; }
.st-wrap.is-readonly .st-plus, .st-wrap.is-readonly .st-head-arrow { display: none !important; }
.st-wrap.is-readonly .st-addrow { display: none; }

.st-scroller { overflow: auto; }

/* ========== 撑满父容器模式（opts.height = '100%' 或 'fill'） ==========
   wrap 变 flex 纵向布局：工具条/添加行固定高，滚动区吃掉剩余空间，addrow 永不被顶出 */
.st-wrap.st-fill { display: flex; flex-direction: column; }
.st-fill > .st-toolbar { flex: 0 0 auto; }
.st-fill > .st-scroller { flex: 1 1 auto; min-height: 0; height: auto; overflow: auto; }
.st-fill > .st-addrow { flex: 0 0 auto; }

/* ========== 尺寸档位（opts.size = small | medium | large，默认 medium=现状） ==========
   整体缩放：字体、行高、内边距。medium 不加覆盖规则，即基础样式 */

/* small：紧凑 */
.st-wrap.st-size-small { font-size: 12px; }
.st-size-small .st-table thead th { height: 30px; }
.st-size-small .st-col-title { padding: 0 8px; }
.st-size-small .st-cell { height: 28px; }
.st-size-small .st-cell-inner { line-height: 27px; padding: 0 8px; }
.st-size-small .st-cell-editor { padding: 0 8px; }
.st-size-small .st-rowhead { font-size: 11px; }
.st-size-small .st-tags-wrap { padding: 3px 8px; }
.st-size-small .st-addrow { padding: 5px 10px; font-size: 12px; }
.st-size-small .st-tool-btn { height: 24px; padding: 0 8px; font-size: 12px; gap: 4px; border-radius: 4px; }

/* large：宽松 */
.st-wrap.st-size-large { font-size: 16px; }
.st-size-large .st-table thead th { height: 48px; }
.st-size-large .st-col-title { padding: 0 14px; }
.st-size-large .st-cell { height: 46px; }
.st-size-large .st-cell-inner { line-height: 45px; padding: 0 14px; }
.st-size-large .st-cell-editor { padding: 0 14px; }
.st-size-large .st-rowhead { font-size: 13px; }
.st-size-large .st-tags-wrap { padding: 11px 14px; }
.st-size-large .st-addrow { padding: 11px 16px; font-size: 14px; }
.st-size-large .st-tool-btn { height: 34px; padding: 0 14px; font-size: 14px; gap: 6px; }

/* ========== 列菜单：重复行高亮 ========== */
.st-table tr.st-dup-row > td:not(.is-sel) { background: #FFF8E1; }
.st-table tr.st-dup-row > td.st-rowhead:not(.is-sel) { background: #FBEFCF; }

/* ========== 合计行 tfoot（opts.showSummary）：sticky 底部固定，number 列求和 ==========
   注意：sticky 必须放在 tfoot 整体上（td 级 sticky bottom 受父行高度约束无法钉底，已实测） */
.st-table tfoot {
    position: sticky;
    bottom: 0;
    z-index: 15;
}
.st-table tfoot td {
    height: 36px;
    background: #FAFAFA;
    border-top: 1px solid #E0E0E0;
    user-select: none;
}
.st-table tfoot .st-cell-inner { font-size: 12px; color: #616161; font-weight: 500; line-height: 35px; }
.st-table tfoot .st-sum-label .st-cell-inner { color: #1F1F1F; text-align: center; }
.st-table tfoot td.is-num .st-cell-inner { text-align: right; color: #1F1F1F; }
.st-size-small .st-table tfoot td { height: 28px; }
.st-size-small .st-table tfoot .st-cell-inner { line-height: 27px; }
.st-size-large .st-table tfoot td { height: 46px; }
.st-size-large .st-table tfoot .st-cell-inner { line-height: 45px; }

/* ========== 表格 ========== */
.st-table {
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    width: max-content;
    min-width: 100%;
    user-select: none;
    -webkit-user-select: none;
}
.st-table th, .st-table td {
    padding: 0;
    border-right: 1px solid #ECECEC;
    border-bottom: 1px solid #ECECEC;
    vertical-align: middle;
    overflow: hidden;
}

/* 表头 */
.st-table thead th {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #FAFAFA;
    height: 38px;
    font-weight: 500;
    text-align: left;
}
.st-col-title {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 10px;
    position: relative;
    cursor: pointer;
}
.st-col-title .st-col-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.st-col-title .st-col-filtered {
    flex-shrink: 0;
    color: #0969DA;
    display: flex;
}
.st-col-title .st-col-sortmark {
    flex-shrink: 0;
    color: #0969DA;
    display: flex;
}
.st-head-arrow {
    display: none !important;
}

/* 行头（序号列） */
.st-rowhead {
    position: sticky;
    left: 0;
    z-index: 10;
    background: #FAFAFA;
    color: #8C8C8C;
    font-size: 12px;
    text-align: center !important;
}
.st-table thead .st-rowhead { z-index: 30; }
.st-rowhead-inner {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.st-rowhead .st-head-arrow { opacity: 0; }
.st-rowhead:hover .st-head-arrow { opacity: 1; }

/* 行高拖拽手柄（行头底边） */
.st-rowresize {
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 6px;
    cursor: row-resize;
    z-index: 5;
}
.st-rowresize:hover { background: rgba(9,105,218,.35); }

/* 列宽拖拽 */
.st-resize {
    position: absolute;
    top: 0;
    right: -3px;
    width: 6px;
    height: 100%;
    cursor: col-resize;
    z-index: 5;
}
.st-resize:hover, .st-resize.is-on { background: rgba(9,105,218,.35); }/* 单元格 */
.st-cell {
    position: relative;
    height: 36px;
    cursor: default;
}
.st-cell-inner {
    padding: 0 10px;
    line-height: 35px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.st-cell.is-num .st-cell-inner { text-align: right; }
.st-cell.is-center { text-align: center; }
.st-cell .st-placeholder { color: #C8C8C8; }

/* 下拉编辑器：顶部搜索框 */
.st-list-search { padding: 8px 8px 6px; border-bottom: 1px solid #ECECEC; }
.st-list-search input {
    width: 100%;
    height: 30px;
    padding: 0 8px;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    font-size: 13px;
    color: #1F1F1F;
    outline: none;
    font-family: inherit;
    box-sizing: border-box;
}
.st-list-search input:focus { border-color: #1F1F1F; }
.st-list-search input::placeholder { color: #C8C8C8; }
.st-list-body { max-height: 216px; overflow-y: auto; }

/* 图片列缩略图 */
.st-img-thumb {
    display: inline-block;
    max-height: 30px;
    max-width: 64px;
    border-radius: 4px;
    vertical-align: middle;
    cursor: zoom-in;
}
.st-detail-value .st-img-thumb { max-height: 80px; max-width: 160px; }

/* 下拉类单元格：仅选中/悬停时显示下拉指示箭头 */
.st-cell .st-dd-arrow {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    color: #BFBFBF;
    pointer-events: none;
    display: none;
}
.st-cell.is-sel .st-dd-arrow,
.st-cell.is-focus .st-dd-arrow,
.st-cell:hover .st-dd-arrow { display: flex; }

/* 选中态 */
.st-cell.is-sel { background: rgba(9,105,218,.08); }
.st-cell.is-focus { box-shadow: inset 0 0 0 2px #0969DA; }
.st-rowhead.is-sel { background: rgba(9,105,218,.12); color: #0969DA; }
.st-table thead th.is-sel { background: rgba(9,105,218,.10); }
.st-table thead th.is-sel .st-col-name { color: #0969DA; }

/* ========== 显示元素 ========== */
.st-tag {
    display: inline-block;
    max-width: 100%;
    padding: 0 8px;
    margin: 0 3px 0 0;
    line-height: 20px;
    border-radius: 10px;
    font-size: 12px;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.st-tag.is-default { background: #F0F2F5; color: #555; }
.st-tags-wrap { display: block; line-height: normal; padding: 7px 10px; }
.st-tags-wrap .st-tag { margin-bottom: 1px; }

.st-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1.5px solid #D9D9D9;
    background: #fff;
    vertical-align: middle;
}
.st-check svg { display: none; }
.st-check.is-on { background: #0969DA; border-color: #0969DA; }
.st-check.is-on svg { display: block; color: #fff; }

/* 空数据 */
.st-empty {
    text-align: center;
    color: #8C8C8C;
    padding: 30px 0 !important;
    cursor: default;
}

/* 尾行（tailEmptyRow）：常驻虚拟空行，点击即新增并进入编辑 */
.st-tail-row { cursor: text; }
.st-tail-row .st-cell-inner { color: transparent; }
.st-tail-row .st-tail-cell { background: #fff; }
.st-tail-row:hover .st-tail-cell { background: #F7FBFF; }
.st-tail-row:hover .st-rowhead { background: #EEF5FC; }
.st-tail-row .st-rowhead { color: #C8C8C8; }
/* 首列表内光标提示（hover 时显示 + 输入引导） */
.st-tail-row .st-tail-cell[data-c="0"] .st-cell-inner::before {
    content: '＋ 双击输入新行';
    color: transparent;
}
.st-tail-row:hover .st-tail-cell[data-c="0"] .st-cell-inner::before { color: #B7C4D4; }

/* 添加行 + 底部统计 */
.st-addrow {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-top: 1px solid #ECECEC;
    color: #8C8C8C;
    font-size: 13px;
    cursor: pointer;
    background: #fff;
    user-select: none;
}
.st-addrow:hover { color: #1F1F1F; background: #FAFAFA; }
.st-addrow svg { display: block; }
.st-addrow.is-disabled { opacity: .4; cursor: not-allowed; }
.st-addrow.is-disabled:hover { color: #8C8C8C; background: #fff; }
.st-addrow-stats {
    margin-left: auto;
    color: #8C8C8C;
    font-size: 12px;
    cursor: default;
}
.st-addrow-stats b { color: #1F1F1F; font-weight: 500; }

/* # 表头全选框 */
.st-checkhead { cursor: pointer; }
.st-checkhead .st-check { cursor: pointer; }
.st-check.is-indet { background: #0969DA; border-color: #0969DA; }
.st-check.is-indet svg { display: block; color: #fff; }

/* ========== 编辑态 ========== */
.st-cell.is-editing { padding: 0; }
.st-cell-editor {
    position: absolute;
    inset: 0;
    border: none;
    outline: none;
    padding: 0 10px;
    font: inherit;
    color: #1F1F1F;
    background: #fff;
    box-shadow: inset 0 0 0 2px #0969DA;
    width: 100%;
    height: 100%;
}

/* ========== 浮层 ========== */
.st-float {
    position: fixed;
    z-index: 99990;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

/* 菜单 */
.st-menu { min-width: 150px; padding: 4px; }
.st-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}
.st-menu-item:hover { background: #F5F5F5; }
.st-menu-item.is-danger { color: #E53935; }
.st-menu-item.is-danger:hover { background: #FDECEA; }
.st-menu-item.is-disabled { opacity: .4; cursor: not-allowed; }
.st-menu-item.is-disabled:hover { background: transparent; }
.st-menu-item svg { display: block; flex-shrink: 0; color: #8C8C8C; }
.st-menu-item.is-danger svg { color: #E53935; }
.st-menu-sep { height: 1px; background: #ECECEC; margin: 4px 8px; }

/* 下拉选择列表 */
.st-list { min-width: 160px; max-height: 264px; overflow-y: auto; padding: 4px; }
.st-list-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}
.st-list-item:hover { background: #F5F5F5; }
.st-list-item .st-opt-clear { color: #8C8C8C; margin-left: auto; font-size: 12px; }
.st-list-empty { padding: 12px; color: #8C8C8C; font-size: 12px; text-align: center; }

/* 复选列表（多选/标签） */
.st-checklist { min-width: 200px; padding: 4px; }
.st-checklist-body { max-height: 220px; overflow-y: auto; }
.st-checklist-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}
.st-checklist-item:hover { background: #F5F5F5; }
.st-checklist-item .st-check { flex-shrink: 0; }
.st-checklist-input {
    display: flex;
    gap: 6px;
    padding: 8px;
    border-top: 1px solid #ECECEC;
    margin-top: 4px;
}
.st-checklist-input input {
    flex: 1;
    height: 28px;
    padding: 0 8px;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
}
.st-checklist-input input:focus { border-color: #1F1F1F; }
.st-checklist-input input::placeholder { color: #C8C8C8; }
.st-checklist-btns {
    display: flex;
    gap: 8px;
    padding: 0 8px 8px;
}

/* 多行文本（textarea）列：单元格内首行截断显示，行详情抽屉内完整换行展示 */
.st-textarea-text { white-space: pre-wrap; word-break: break-word; }
.st-cell .st-textarea-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
}

/* textarea 编辑浮层（锚定单元格下方，空间不足自动翻到上方） */
.st-textarea-pop { width: 340px; padding: 10px; }
.st-textarea-input {
    display: block;
    width: 100%;
    height: 140px;
    padding: 7px 9px;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.6;
    color: #1F1F1F;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
    outline: none;
}
.st-textarea-input:focus { border-color: #0969DA; }
.st-textarea-input::placeholder { color: #C8C8C8; }
.st-textarea-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}
.st-textarea-tip { margin-right: auto; font-size: 12px; color: #8C8C8C; }
.st-textarea-foot .st-mini-btn { min-width: 62px; height: 28px; }

.st-mini-btn {
    height: 28px;
    padding: 0 14px;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    background: #fff;
    color: #1F1F1F;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
}
.st-mini-btn:hover { background: #F5F5F5; }
.st-mini-btn.is-primary { background: #1F1F1F; border-color: #1F1F1F; color: #fff; }
.st-mini-btn.is-primary:hover { background: #000; }
.st-mini-btn.is-danger { background: #E53935; border-color: #E53935; color: #fff; }
.st-mini-btn.is-danger:hover { background: #C62828; }

/* ========== 居中确认弹窗（黑白灰主色调） ========== */
.st-dialog-mask {
    position: fixed;
    inset: 0;
    z-index: 99993;
    background: rgba(31,31,31,.32);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .18s ease;
}
.st-dialog-mask.is-open { opacity: 1; }
.st-dialog {
    width: 360px;
    max-width: 88vw;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,.18);
    transform: scale(.94) translateY(6px);
    transition: transform .18s ease;
}
.st-dialog-mask.is-open .st-dialog { transform: scale(1) translateY(0); }
.st-dialog-head {
    padding: 20px 22px 0;
    font-size: 15px;
    font-weight: 600;
    color: #1F1F1F;
}
.st-dialog-body {
    padding: 10px 22px 6px;
    font-size: 13px;
    color: #555;
    line-height: 1.7;
}
.st-dialog-body b { color: #1F1F1F; font-weight: 600; }
.st-dialog-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 22px 20px;
}
.st-dialog-foot .st-mini-btn { min-width: 78px; height: 30px; }

/* 日历 */
.st-cal { width: 248px; padding: 12px; }.st-cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.st-cal-title { font-size: 13px; font-weight: 500; }
.st-cal-nav {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #1F1F1F;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.st-cal-nav:hover { background: #F5F5F5; }
.st-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.st-cal-wd {
    text-align: center;
    font-size: 11px;
    color: #8C8C8C;
    line-height: 22px;
}
.st-cal-day {
    height: 28px;
    line-height: 28px;
    text-align: center;
    font-size: 12px;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    background: transparent;
    padding: 0;
    font-family: inherit;
    color: #1F1F1F;
}
.st-cal-day:hover { background: #F5F5F5; }
.st-cal-day.is-today { color: #0969DA; font-weight: 500; }
.st-cal-day.is-selected { background: #0969DA; color: #fff; }
.st-cal-day.is-empty { cursor: default; color: transparent; }
.st-cal-foot {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #ECECEC;
}
.st-cal-foot .st-mini-btn { flex: 1; height: 26px; }

/* 列编辑弹窗 */
.st-coledit { width: 300px; padding: 14px; }
.st-coledit-title { font-size: 13px; font-weight: 500; margin-bottom: 10px; }
.st-field { margin-bottom: 10px; }
.st-field-label { font-size: 12px; color: #8C8C8C; margin-bottom: 4px; }
.st-field input[type="text"], .st-field select, .st-field textarea {
    display: block;
    width: 100%;
    height: 30px;
    padding: 0 8px;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    font-size: 13px;
    color: #1F1F1F;
    outline: none;
    font-family: inherit;
    background: #fff;
}
.st-field textarea { height: auto; min-height: 70px; padding: 6px 8px; line-height: 1.6; resize: vertical; }
.st-field input:focus, .st-field select:focus, .st-field textarea:focus { border-color: #1F1F1F; }
.st-field textarea::placeholder, .st-field input::placeholder { color: #C8C8C8; }
.st-field-row { display: flex; gap: 10px; }
.st-field-row .st-field { flex: 1; }
.st-coledit-btns { display: flex; gap: 8px; margin-top: 12px; }
.st-coledit-btns .st-mini-btn { flex: 1; height: 30px; }

/* 重命名弹窗 */
.st-rename { width: 240px; padding: 12px; }
.st-rename input {
    display: block;
    width: 100%;
    height: 30px;
    padding: 0 8px;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
}
.st-rename input:focus { border-color: #1F1F1F; }
.st-rename .st-coledit-btns { margin-top: 10px; }

/* 列筛选面板 */
.st-filter { width: 380px; padding: 18px; }
.st-filter-title { font-size: 14px; font-weight: 500; margin-bottom: 14px; }
.st-filter-row { display: flex; gap: 10px; margin-bottom: 16px; }
.st-filter-row select, .st-filter-row input {
    height: 36px;
    padding: 0 10px;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    font-size: 13px;
    color: #1F1F1F;
    outline: none;
    font-family: inherit;
    background: #fff;
}
.st-filter-row select { width: 130px; flex-shrink: 0; }
.st-filter-row input { flex: 1; min-width: 0; }
.st-filter-row input:focus, .st-filter-row select:focus { border-color: #1F1F1F; }
.st-filter-row input::placeholder { color: #C8C8C8; }
.st-filter-btns { display: flex; gap: 10px; }
.st-filter-btns .st-mini-btn { flex: 1; height: 34px; }
.st-filter-btns .st-mini-btn.is-clear { color: #0969DA; }

/* 筛选面板候选值（员工/部门显示名 / 选择类标签），点击填入搜索框 */
.st-filter-sug {
    max-height: 160px;
    overflow-y: auto;
    border-top: 1px solid #F0F0F0;
    padding-top: 6px;
    margin-bottom: 12px;
}
.st-filter-sug-item {
    padding: 5px 8px;
    font-size: 13px;
    color: #1F1F1F;
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.st-filter-sug-item:hover { background: #F5F5F5; }

/* 多值筛选：已选 chips + 候选点选高亮 */
.st-filter-sel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}
.st-filter-sel:empty { display: none; }
.st-filter-sel-head { font-size: 12px; color: #8C8C8C; }
.st-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #0969DA;
    color: #fff;
    border-radius: 4px;
    padding: 3px 6px 3px 8px;
    font-size: 12px;
    line-height: 1.4;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.st-filter-chip b { cursor: pointer; font-weight: 400; opacity: .75; padding: 0 2px; }
.st-filter-chip b:hover { opacity: 1; }
.st-filter-sug-item.is-on {
    background: #E8F1FC;
    color: #0969DA;
    font-weight: 500;
}
.st-filter-sug-check { display: inline-block; width: 16px; color: #0969DA; }
.st-filter-sug-empty { padding: 8px; font-size: 12px; color: #C8C8C8; text-align: center; }

/* ========== 公式面板（可视化设置 + 自定义公式） ========== */
.st-formula { width: 420px; padding: 18px; }
.st-fx-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.st-fx-tabs button {
    flex: 1;
    height: 28px;
    border: 1px solid #E0E0E0;
    background: #fff;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    color: #8C8C8C;
    font-family: inherit;
}
.st-fx-tabs button.is-on { background: #1F1F1F; color: #fff; border-color: #1F1F1F; }
.st-fx-row { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.st-fx-ops { display: flex; gap: 2px; flex-shrink: 0; }
.st-fx-ops button {
    width: 28px;
    height: 28px;
    border: 1px solid #E0E0E0;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: #8C8C8C;
    padding: 0;
    line-height: 1;
}
.st-fx-ops button:hover { border-color: #0969DA; color: #0969DA; }
.st-fx-ops button.is-on { background: #0969DA; border-color: #0969DA; color: #fff; }
.st-fx-row select {
    flex: 1;
    min-width: 0;
    height: 30px;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    font-size: 13px;
    padding: 0 6px;
    color: #1F1F1F;
    outline: none;
    background: #fff;
    font-family: inherit;
}
.st-fx-row select:focus { border-color: #1F1F1F; }
.st-fx-del {
    width: 22px;
    height: 26px;
    border: none;
    background: transparent;
    color: #C8C8C8;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}
.st-fx-del:hover { color: #E53935; }
.st-fx-add {
    border: 1px dashed #D9D9D9;
    background: #fff;
    color: #8C8C8C;
    height: 28px;
    padding: 0 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    margin-bottom: 10px;
    font-family: inherit;
}
.st-fx-add:hover { color: #0969DA; border-color: #0969DA; }
.st-fx-preview {
    font-size: 12px;
    color: #8C8C8C;
    background: #FAFAFA;
    border-radius: 6px;
    padding: 8px 10px;
    margin-bottom: 14px;
    word-break: break-all;
}
.st-fx-preview b { color: #1F1F1F; font-weight: 500; }
.st-fx-hint { font-size: 12px; color: #8C8C8C; margin-top: 8px; }
.st-formula .st-filter-btns { margin-top: 14px; }

/* Loading 遮罩 */
.st-loading {
    position: absolute;
    inset: 0;
    z-index: 60;
    background: rgba(255,255,255,.72);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #8C8C8C;
    font-size: 13px;
}
.st-loading-spinner {
    width: 22px;
    height: 22px;
    border: 2px solid #E0E0E0;
    border-top-color: #1F1F1F;
    border-radius: 50%;
    animation: st-rotate .8s linear infinite;
}
@keyframes st-rotate { to { transform: rotate(360deg); } }

/* Toast */
.st-toast {
    position: fixed;
    left: 50%;
    bottom: 40px;
    transform: translateX(-50%);
    z-index: 99999;
    padding: 8px 18px;
    background: rgba(31,31,31,.9);
    color: #fff;
    font-size: 13px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    pointer-events: none;
    transition: opacity .2s;
}

/* 滚动条 */
.st-scroller::-webkit-scrollbar { width: 8px; height: 8px; }
.st-scroller::-webkit-scrollbar-thumb { background: #D9D9D9; border-radius: 4px; }
.st-scroller::-webkit-scrollbar-thumb:hover { background: #BFBFBF; }
.st-scroller::-webkit-scrollbar-track { background: transparent; }

/* ========== 顶部功能区 ========== */
.st-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 6px 12px;
    border-bottom: 1px solid #ECECEC;
    flex-shrink: 0;
    background: #fff;
}
.st-toolbar-left, .st-toolbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.st-toolbar-center { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.st-toolbar-center::-webkit-scrollbar { display: none; }
.st-tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 30px;
    padding: 0 12px;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    background: #fff;
    color: #1F1F1F;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
}
.st-tool-btn:hover { background: #F5F5F5; }
.st-tool-btn svg { display: block; }
.st-tool-btn.is-danger { color: #E53935; }
.st-tool-btn.is-disabled { opacity: .4; cursor: not-allowed; }
.st-tool-btn.is-disabled:hover { background: #fff; }

/* ========== 行详情抽屉 ========== */
.st-drawer-mask {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.25);
    z-index: 99991;
    opacity: 0;
    transition: opacity .2s;
}
.st-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 400px;
    max-width: 90vw;
    background: #fff;
    box-shadow: -8px 0 24px rgba(0,0,0,.12);
    z-index: 99992;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .22s ease;
}
.st-drawer.is-open { transform: translateX(0); }
.st-drawer-mask.is-open { opacity: 1; }
.st-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid #ECECEC;
    flex-shrink: 0;
}
.st-drawer-title { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-drawer-close {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #8C8C8C;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
}
.st-drawer-close:hover { background: #F5F5F5; color: #1F1F1F; }
.st-drawer-body { flex: 1; overflow-y: auto; padding: 12px 16px 20px; }
.st-detail-id { font-size: 12px; color: #8C8C8C; margin-bottom: 10px; }
.st-detail-field { padding: 10px 0; border-bottom: 1px solid #F0F0F0; }
.st-detail-label { font-size: 12px; color: #8C8C8C; margin-bottom: 4px; }
.st-detail-value { font-size: 14px; line-height: 1.7; color: #1F1F1F; word-break: break-word; white-space: normal; }
.st-detail-value .st-tags-wrap { padding: 0; line-height: 1.7; display: block; }
.st-detail-value .st-tag { margin-bottom: 2px; }
