/* ============================================================
   ytSearch 组件样式 v1.3
   修复: 时间选择器三列滚动对齐
   ============================================================ */
/* ============================================================
   ytSearch 组件样式
   ★ 所有组件内部元素强制 border-box
   防止项目全局 box-sizing 不同时 padding 溢出容器
   ============================================================ */
.ys-bar,
.ys-bar *,
.ys-bar *::before,
.ys-bar *::after {
    box-sizing: border-box;
}
/* 搜索栏容器 */
.ys-bar {
    background: #fff;
    /*border: 1px solid rgba(0,0,0,.06);*/
    border-radius: 6px;
    margin-bottom: 14px;
    /*box-shadow: 0 1px 4px rgba(0,0,0,.04);*/
}

/* 快捷时间 */
.ys-quick {
    display: flex;
    align-items: center;
    padding: 8px 16px 8px 3px;
    gap: 6px;
    /*border-bottom: 1px solid #f5f5f5;*/
    /*background: #fafafa;*/
    flex-wrap: wrap;
}
.ys-qt-lbl {
    font-size: 12px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    margin-right: 2px;
}
.ys-qt-lbl svg { width: 13px; height: 13px; color: #bbb; }
.ys-qt {
    height: 24px;
    line-height: 24px;
    padding: 0 10px;
    font-size: 12px;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    background: #fff;
    color: #666;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
    font-family: inherit;
}
.ys-qt:hover { border-color: #1890ff; color: #1890ff; }
.ys-qt.active { background: #1890ff; color: #fff; border-color: #1890ff; }

/* 字段网格 */
/*.ys-grid {*/
/*    display: grid;*/
/*    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));*/
/*    gap: 14px 16px;*/
/*    padding: 14px 16px 6px;*/
/*}*/
/* ★ 网格 + 按钮 同行容器 */
.ys-grid-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    /*padding: 0 12px 8px;*/
}

/* ★ 字段网格（24列） */
.ys-grid {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(24, 1fr);
    gap: 8px 12px;
    padding: 0;
}

.ys-item { display: flex; flex-direction: column; min-width: 0; }
.ys-lbl {
    font-size: 12px;
    color: #8c8c8c;
    margin-bottom: 8px;
    white-space: nowrap;
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 4px;
}
.ys-lbl svg { width: 13px; height: 13px; color: #bfbfbf; flex-shrink: 0; margin-left: 4px;}
.ys-req { color: #ff4d4f; font-style: normal; margin-left: 1px; font-size: 14px; }
.ys-fw { position: relative; }

/* 错误状态 */
.ys-item.ys-err .ys-input,
.ys-item.ys-err .ys-cs-bar,
.ys-item.ys-err .ys-ts-bar,
.ys-item.ys-err .ys-dr-i .ys-input {
    border-color: #ff4d4f !important;
    box-shadow: 0 0 0 2px rgba(255,77,79,.1) !important;
}
.ys-err-tip {
    position: absolute;
    left: 0; top: 100%;
    z-index: 900;
    font-size: 12px;
    color: #fff;
    line-height: 1.2;
    padding: 6px 10px;
    margin-top: 4px;
    background: #ff4d4f;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all .2s;
    pointer-events: none;
}
.ys-err-tip::before {
    content: '';
    position: absolute;
    left: 16px; top: -4px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid #ff4d4f;
}
.ys-err-tip.show { opacity: 1; visibility: visible; transform: translateY(0); }

/* 输入框 */
.ys-iw { position: relative; display: flex; align-items: center; }
.ys-iw .ys-ico,
.ys-dr-i .ys-ico {
    position: absolute;
    left: 8px; top: 50%;
    transform: translateY(-50%);
    width: 15px; height: 15px;
    color: #bfbfbf;
    pointer-events: none;
    z-index: 1;
    display: flex;
    align-items: center;
    transition: color .2s;
}
.ys-iw .ys-ico svg,
.ys-dr-i .ys-ico svg { width: 100%; height: 100%; }
.ys-iw:focus-within .ys-ico { color: #1890ff; }
.ys-input {
    height: 32px;
    line-height: 32px;
    padding: 0 10px 0 30px;
    font-size: 13px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    outline: none;
    color: #333;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    width: 100%;
    font-family: inherit;
}
.ys-input:hover { border-color: #40a9ff; }
.ys-input:focus { border-color: #1890ff; box-shadow: 0 0 0 2px rgba(24,144,255,.08); }
.ys-input::placeholder { color: #bfbfbf; }
.ys-input[readonly] { cursor: pointer; background: #fff; }
.ys-input-flat { padding-left: 10px; }

/* 日期范围 */
.ys-dr { display: flex; align-items: center; }
.ys-dr-i { flex: 1; position: relative; display: flex; align-items: center; min-width: 0; }
.ys-dr-i .ys-input { padding-left: 28px; border-radius: 0; }
.ys-dr-i:first-child .ys-input { border-radius: 4px 0 0 4px; }
.ys-dr-i:last-child .ys-input { border-radius: 0 4px 4px 0; }
.ys-dr-sep {
    height: 32px; line-height: 32px;
    padding: 0 8px;
    font-size: 12px; color: #bfbfbf;
    background: #fafafa;
    border-top: 1px solid #d9d9d9;
    border-bottom: 1px solid #d9d9d9;
    white-space: nowrap; flex-shrink: 0;
}

/* 数字范围 */
.ys-nr { display: flex; align-items: center; }
.ys-nr .ys-input { border-radius: 0; min-width: 0; flex: 1; }
.ys-nr .ys-input:first-child { border-radius: 4px 0 0 4px; }
.ys-nr .ys-input:last-child { border-radius: 0 4px 4px 0; }
.ys-nr-sep {
    height: 32px; line-height: 32px;
    padding: 0 6px;
    font-size: 12px; color: #bfbfbf;
    background: #fafafa;
    border-top: 1px solid #d9d9d9;
    border-bottom: 1px solid #d9d9d9;
}

/* 下拉容器 */
.ys-cs, .ys-ts { position: relative; width: 100%; }
.ys-cs-bar, .ys-ts-bar {
    display: flex; align-items: center;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    cursor: pointer;
    min-height: 32px;
    position: relative; width: 100%;
}
.ys-cs-bar:hover, .ys-ts-bar:hover { border-color: #40a9ff; }
.ys-cs.open .ys-cs-bar,
.ys-ts.open .ys-ts-bar {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24,144,255,.08);
}
.ys-cs-bar .ys-ico, .ys-ts-bar .ys-ico {
    position: absolute;
    left: 8px; top: 50%;
    transform: translateY(-50%);
    width: 15px; height: 15px;
    color: #bfbfbf;
    pointer-events: none;
    display: flex; align-items: center;
    transition: color .2s;
}
.ys-cs-bar .ys-ico svg, .ys-ts-bar .ys-ico svg { width: 100%; height: 100%; }
.ys-cs.open .ys-cs-bar .ys-ico,
.ys-ts.open .ys-ts-bar .ys-ico { color: #1890ff; }
.ys-cs-text, .ys-ts-text {
    flex: 1;
    padding: 0 28px 0 30px;
    font-size: 13px; color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 32px;
    min-height: 32px;
}
.ys-cs-text.ph, .ys-ts-text.ph { color: #bfbfbf; }
.ys-cs-arr {
    position: absolute;
    right: 8px; top: 50%;
    transform: translateY(-50%);
    width: 14px; height: 14px;
    color: #bfbfbf;
    display: flex; align-items: center;
    transition: transform .2s;
}
.ys-cs-arr svg { width: 100%; height: 100%; }
.ys-cs.open .ys-cs-arr,
.ys-ts.open .ys-cs-arr { transform: translateY(-50%) rotate(180deg); }
.ys-ssel-x {
    position: absolute;
    right: 24px; top: 50%;
    transform: translateY(-50%);
    width: 16px; height: 16px;
    cursor: pointer;
    display: none;
    align-items: center; justify-content: center;
    border-radius: 50%;
    color: #bbb; z-index: 2;
}
.ys-ssel-x:hover { color: #ff4d4f; }
.ys-ssel-x svg { width: 10px; height: 10px; }
.ys-cs-bar:hover .ys-ssel-x,
.ys-ts-bar:hover .ys-ssel-x { display: flex; }

/* 普通下拉面板 */
.ys-cs-panel {
    display: none;
    position: absolute;
    left: 0; top: calc(100% + 4px);
    width: 100%;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    box-shadow: 0 6px 16px rgba(0,0,0,.12);
    z-index: 900;
    overflow: hidden;
}
.ys-cs.open .ys-cs-panel { display: block; }
.ys-cs-search-w { padding: 8px 10px; border-bottom: 1px solid #f0f0f0; }
.ys-cs-search {
    width: 100%; height: 30px; line-height: 30px;
    padding: 0 10px;
    font-size: 13px;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    outline: none;
    font-family: inherit;
    transition: border-color .2s;
}
.ys-cs-search:focus { border-color: #1890ff; }
.ys-cs-opts { max-height: 320px; overflow-y: auto; padding: 4px 0; }
.ys-cs-opt {
    display: flex; align-items: center;
    padding: 7px 12px;
    font-size: 13px; color: #333;
    cursor: pointer;
    transition: background .1s;
    gap: 8px;
}
.ys-cs-opt:hover { background: #f5f5f5; }
.ys-cs-opt.sel { background: #e6f7ff; color: #1890ff; }
.ys-cs-opt-t { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ys-cs-empty { padding: 20px 12px; text-align: center; color: #bbb; font-size: 13px; }
.ys-cs-chk { display: flex; align-items: center; cursor: pointer; }
.ys-cs-chk input { display: none; }
.ys-cs-chk-icon {
    width: 16px; height: 16px;
    border: 1px solid #d9d9d9;
    border-radius: 3px;
    display: flex; align-items: center; justify-content: center;
    transition: all .15s;
    flex-shrink: 0;
}
.ys-cs-chk input:checked + .ys-cs-chk-icon { background: #1890ff; border-color: #1890ff; }
.ys-cs-chk input:checked + .ys-cs-chk-icon::after {
    content: '';
    display: block;
    width: 4px; height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translateY(-1px);
}
.ys-cs-acts {
    display: flex; justify-content: space-between;
    padding: 6px 12px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}
.ys-cs-acts a { font-size: 12px; color: #1890ff; cursor: pointer; padding: 2px 6px; border-radius: 3px; }
.ys-cs-acts a:hover { background: #e6f7ff; }

/* 树选择面板 */
.ys-ts-panel {
    display: none;
    position: absolute;
    left: 0; top: calc(100% + 4px);
    width: 100%; min-width: 280px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    box-shadow: 0 6px 16px rgba(0,0,0,.12);
    z-index: 900;
    overflow: hidden;
}
.ys-ts.open .ys-ts-panel { display: block; }
.ys-ts-conds { display: flex; padding: 10px 10px 0; gap: 0; }
.ys-ts-cond {
    flex: 1; height: 30px; line-height: 30px;
    font-size: 12px;
    border: 1px solid #e0e0e0;
    background: #fff; color: #666;
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
    padding: 0 6px;
    white-space: nowrap;
    position: relative;
    font-weight: 400;
}
.ys-ts-cond:first-child { border-radius: 4px 0 0 4px; }
.ys-ts-cond:last-child { border-radius: 0 4px 4px 0; }
.ys-ts-cond + .ys-ts-cond { margin-left: -1px; }
.ys-ts-cond.active {
    background: linear-gradient(135deg, #1890ff, #096dd9);
    border-color: #1890ff;
    color: #fff;
    font-weight: 500;
    z-index: 1;
    box-shadow: 0 1px 4px rgba(24,144,255,.3);
}
.ys-ts-cond:hover:not(.active) { color: #1890ff; border-color: #91d5ff; background: #f0f8ff; }
.ys-ts-srow { display: flex; gap: 6px; padding: 8px 10px; border-bottom: 1px solid #f0f0f0; }
.ys-ts-search {
    flex: 1; height: 30px; line-height: 30px;
    padding: 0 10px;
    font-size: 13px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    outline: none;
    font-family: inherit;
    transition: border-color .2s, box-shadow .2s;
}
.ys-ts-search:focus { border-color: #1890ff; box-shadow: 0 0 0 2px rgba(24,144,255,.08); }
.ys-ts-sbtn {
    height: 30px; padding: 0 14px;
    font-size: 12px;
    background: linear-gradient(135deg, #1890ff, #096dd9);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex; align-items: center; gap: 4px;
    font-family: inherit;
    transition: all .2s;
    white-space: nowrap;
    font-weight: 500;
    box-shadow: 0 1px 4px rgba(24,144,255,.3);
}
.ys-ts-sbtn:hover { box-shadow: 0 2px 8px rgba(24,144,255,.4); transform: translateY(-1px); }
.ys-ts-sbtn svg { width: 13px; height: 13px; }
.ys-ts-tree { max-height: 360px; overflow-y: auto; padding: 6px 0; }

/* zTree */
/*.ys-ts-tree.ztree { margin: 0; padding: 0; }*/
/*.ys-ts-tree.ztree ul { margin: 0; padding: 0 0 0 18px; }*/
/*.ys-ts-tree.ztree li { list-style: none; position: relative; padding: 2px 0; }*/
/*.ys-ts-tree.ztree li a {*/
/*    padding: 4px 8px; margin: 0;*/
/*    border-radius: 4px;*/
/*    display: inline-block;*/
/*    line-height: 22px;*/
/*    text-decoration: none;*/
/*    font-size: 13px; color: #333;*/
/*    cursor: pointer;*/
/*    transition: background .15s;*/
/*    width: calc(100% - 20px);*/
/*}*/
/*.ys-ts-tree.ztree li a:hover { background: #f0f8ff; }*/
/*.ys-ts-tree.ztree li a.curSelectedNode { background: #e6f7ff; color: #1890ff; border: none; padding: 4px 8px; }*/
/*.ys-ts-tree.ztree li span.button { width: 20px; height: 20px; display: inline-block; vertical-align: middle; border: 0; cursor: pointer; outline: none; background: none; }*/
/*.ys-ts-tree.ztree li span.button.switch { width: 20px; height: 20px; }*/
/*.ys-ts-tree.ztree li span.button.noline_open::before,*/
/*.ys-ts-tree.ztree li span.button.noline_close::before { content: '\25B8'; font-size: 12px; color: #999; display: inline-block; transition: transform .2s; }*/
/*.ys-ts-tree.ztree li span.button.noline_open::before { transform: rotate(90deg); }*/
/*.ys-ts-tree.ztree li span.button.noline_docu { display: none; }*/
/*.ys-tree-folder-ico { display: inline-flex; width: 16px; height: 16px; color: #faad14; vertical-align: middle; margin-right: 4px; }*/
/*.ys-tree-folder-ico svg { width: 100%; height: 100%; }*/
/*.ys-tree-leaf-ico { display: inline-flex; width: 16px; height: 16px; color: #1890ff; vertical-align: middle; margin-right: 4px; }*/
/*.ys-tree-leaf-ico svg { width: 100%; height: 100%; }*/

/* 按钮 */
.ys-footer {
    flex-shrink: 0;
    padding: 0;
    margin: 0;
}
.ys-footer .ys-btns {
    display: flex;
    gap: 6px;
    align-items: flex-end;
    padding-bottom: 2px;
}
/*.ys-btns { display: flex; gap: 8px; }*/
.ys-btn {
    height: 32px; line-height: 32px;
    padding: 0 20px;
    font-size: 13px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex; align-items: center; gap: 4px;
    transition: all .2s;
    white-space: nowrap;
    font-family: inherit;
}
.ys-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.ys-btn-go { background: #1890ff; color: #fff; box-shadow: 0 2px 6px rgba(24,144,255,.2); }
.ys-btn-go:hover { background: #096dd9; }
.ys-btn-go:hover svg { transform: scale(1.1); }
.ys-btn-clr { background: #fff; color: #595959; border: 1px solid #d9d9d9; }
.ys-btn-clr:hover { color: #1890ff; border-color: #1890ff; }
.ys-btn-clr:hover svg { transform: rotate(-180deg); }

/* ============================================================
   日历弹出层
   ============================================================ */
.ys-dp {
    position: absolute; z-index: 999999999;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    box-shadow: 0 8px 28px rgba(0,0,0,.16);
    padding: 14px;
    width: 310px;
    animation: ysDpIn .15s ease;
}
@keyframes ysDpIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.ys-dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ys-dp-nav {
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; border-radius: 50%;
    color: #666; font-size: 20px; font-weight: 600;
    transition: all .15s; user-select: none;
}
.ys-dp-nav:hover { background: #f0f0f0; color: #333; }
.ys-dp-tt { font-size: 14px; font-weight: 600; color: #333; }
.ys-dp-wk { display: grid; grid-template-columns: repeat(7,1fr); margin-bottom: 4px; }
.ys-dp-wk span { text-align: center; font-size: 11px; color: #bbb; padding: 4px 0; font-weight: 500; }
.ys-dp-gd { display: grid; grid-template-columns: repeat(7,1fr); }
.ys-dp-d {
    text-align: center; height: 30px; line-height: 30px;
    font-size: 13px; color: #333;
    cursor: pointer; border-radius: 4px;
    transition: all .1s; user-select: none;
}
.ys-dp-d:hover:not(.off):not(.sel) { background: #f0f0f0; }
.ys-dp-d.off { color: #d9d9d9; cursor: default; }
.ys-dp-d.today { color: #1890ff; font-weight: 600; box-shadow: inset 0 0 0 1px #1890ff; }
.ys-dp-d.sel { background: #1890ff; color: #fff; font-weight: 500; box-shadow: none; }
.ys-dp-d.sel.st { border-radius: 4px 0 0 4px; }
.ys-dp-d.sel.en { border-radius: 0 4px 4px 0; }
.ys-dp-d.ir { background: #e6f7ff; color: #1890ff; border-radius: 0; }
.ys-dp-d.today.sel { box-shadow: none; }

/* ============================================================
   时间滚动选择器 —— 三列对齐修复
   ============================================================ */
.ys-dp-tp-wrap { border-top: 1px solid #f0f0f0; margin-top: 6px; padding-top: 6px; }
.ys-dp-tabs { display: flex; padding: 0 2px; margin-bottom: 6px; }
.ys-dp-tab {
    flex: 1; height: 26px; line-height: 26px;
    text-align: center;
    font-size: 12px; color: #666;
    cursor: pointer;
    border: 1px solid #e8e8e8;
    background: #fff;
    transition: all .15s;
    font-family: inherit;
}
.ys-dp-tab:first-child { border-radius: 4px 0 0 4px; }
.ys-dp-tab:last-child { border-radius: 0 4px 4px 0; }
.ys-dp-tab + .ys-dp-tab { border-left: none; }
.ys-dp-tab.active { background: #1890ff; border-color: #1890ff; color: #fff; }

/* 三列并排容器 */
.ys-tp {
    display: flex; height: 160px;
    position: relative;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}
.ys-tp-col {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #f0f0f0;
}
.ys-tp-col:last-child { border-right: none; }

/* 列头 */
.ys-tp-hd {
    text-align: center;
    font-size: 11px; color: #999;
    padding: 5px 0;
    border-bottom: 1px solid #f5f5f5;
    background: #fafafa;
    flex-shrink: 0;
}

/*
 * ★★★ 滚动容器 —— 核心修复 ★★★
 *
 * 修复点 1: position:relative
 *   让 .ys-tp-sc 成为 .ys-tp-it 的 offsetParent
 *   使 this.offsetTop 相对于滚动容器自身（而非 .ys-tp-col）
 *   这样 offsetTop 和 scrollTop 在同一坐标系下，中心计算才准确
 *
 * 修复点 2: scroll-snap-type:y mandatory
 *   浏览器原生强制吸附：手指离开后自动将最近的 .ys-tp-it
 *   滚动到容器正中心（scroll-snap-align:center 配合）
 *   三列容器尺寸相同 → 吸附后 .sel 项在三列中处于同一水平线
 */
.ys-tp-sc {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
    position: relative;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
}
.ys-tp-sc::-webkit-scrollbar { display: none; }

/* 上下留白 */
.ys-tp-pad { height: 64px; }

/* 蓝色指示器 —— 固定在每列中心 */
.ys-tp-col::after {
    content: '';
    position: absolute;
    left: 2px; right: 2px;
    top: 50%;
    transform: translateY(calc(-50% + 12px));
    height: 32px;
    background: #1890ff;
    border-radius: 3px;
    pointer-events: none;
    z-index: 4;
    box-shadow: 0 0 10px rgba(24,144,255,.2);
}

/*
 * ★★★ 时间选项 —— 滚动吸附对齐 ★★★
 *
 * scroll-snap-align:center 告诉浏览器：
 *   当滚动停止时，将此元素的中心对齐到滚动容器的中心
 *   配合 scroll-snap-type:mandatory，浏览器保证每次必吸附
 *
 * 层级: z-index:5(选项) > z-index:4(蓝色条)
 * 默认白底遮盖蓝色条，.sel 透明露出蓝色条
 */
.ys-tp-it {
    height: 32px; line-height: 32px;
    text-align: center;
    font-size: 14px;
    font-family: Menlo, Consolas, monospace;
    color: #333;
    cursor: pointer;
    user-select: none;
    position: relative;
    z-index: 5;
    background: #fff;
    transition: color .1s, background .1s;
    scroll-snap-align: center;
}
.ys-tp-it:hover { color: #1890ff; }
.ys-tp-it.sel {
    background: transparent;
    color: #fff;
    font-weight: 600;
}

/* 渐变遮罩 */
.ys-tp-sc::before {
    content: '';
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    display: block;
    height: 24px; width: 100%;
    background: linear-gradient(to bottom, rgba(255,255,255,.95), transparent);
    pointer-events: none;
    z-index: 7;
    margin-bottom: -24px;
}
.ys-tp-sc::after {
    content: '';
    position: -webkit-sticky;
    position: sticky;
    bottom: 0;
    display: block;
    height: 24px; width: 100%;
    background: linear-gradient(to top, rgba(255,255,255,.95), transparent);
    pointer-events: none;
    z-index: 7;
    margin-top: -24px;
}

/* 日历底部 */
.ys-dp-ft {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 8px; padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}
.ys-dp-ftl { display: flex; gap: 10px; }
.ys-dp-ftl a {
    font-size: 12px; color: #1890ff;
    cursor: pointer; padding: 2px 6px; border-radius: 3px;
    transition: background .15s;
}
.ys-dp-ftl a:hover { background: #e6f7ff; }
.ys-dp-ok {
    height: 28px; padding: 0 18px;
    font-size: 12px;
    background: #1890ff; color: #fff;
    border: none; border-radius: 4px;
    cursor: pointer;
    font-family: inherit; font-weight: 500;
    transition: background .15s;
}
.ys-dp-ok:hover { background: #096dd9; }



/* ============================================================
   树选择器增强样式
   ============================================================ */

/* ★ 树容器包裹层
   在 _initOneTS 中动态创建
   作为 loading / tip 的定位参考 */
.ys-ts-tree-wrap {
    position: relative;
    min-height: 60px;
}

/* ★ loading 遮罩 — 只覆盖树区域，不影响搜索条件 */
.ys-ts-loading-box {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.92);
    z-index: 100;
    border-radius: 0 0 4px 4px;
}
.ys-ts-loading-box .ys-ts-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #e8e8e8;
    border-top-color: #1890ff;
    border-radius: 50%;
    animation: ys-ts-spin 0.6s linear infinite;
    margin-right: 8px;
    flex-shrink: 0;
}
.ys-ts-loading-box .ys-ts-loading-text {
    color: #1890ff;
    font-size: 13px;
    white-space: nowrap;
}
@keyframes ys-ts-spin {
    to { transform: rotate(360deg); }
}

/* ★ 提示层（关键字过短、暂无数据等）— 同样只覆盖树区域 */
.ys-ts-tip-box {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    z-index: 100;
    font-size: 13px;
    line-height: 1.8;
    text-align: center;
    padding: 16px;
}
.ys-ts-tip-box.warn {
    color: #faad14;
}
.ys-ts-tip-box.info {
    color: #999;
}

/* ★ "该分组下无数据" 占位节点样式 */
.ztree li a.no-data-node {
    color: #bbb;
    cursor: default;
    font-style: italic;
}
.ztree li a.no-data-node:hover {
    background: transparent;
}



/* ============================================================
   响应式布局（移动端适配）

   断点: 768px（手机竖屏）

   桌面: .ys-grid-row 水平排列
         .ys-grid (24列) + .ys-footer 按钮同行显示

   手机: .ys-grid-row 垂直排列
         .ys-grid 单列（字段满宽）
         .ys-footer 按钮在底部右对齐
   ============================================================ */
@media (max-width: 768px) {

    /* ── 搜索栏整体缩小内边距 ── */
    .ys-bar {
        padding: 6px;
    }

    /* ── 网格 + 按钮 改为垂直排列 ── */
    .ys-grid-row {
        flex-direction: column;
        gap: 8px;
        padding: 0 6px 6px;
        align-items: stretch;
    }

    /* ── 网格改为单列，每个字段占满整行 ──
       必须用 !important 覆盖内联的 grid-column:span X */
    .ys-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .ys-grid .ys-item {
        grid-column: span 1 !important;
    }

    /* ── 按钮栏占满宽度，按钮右对齐 ── */
    .ys-footer {
        width: 100%;
    }
    .ys-footer .ys-btns {
        justify-content: flex-end;
    }

    /* ── 快捷时间栏自动换行 ── */
    .ys-quick {
        flex-wrap: wrap;
        gap: 4px;
    }

    /* ── 树选择器搜索行（输入框 + 查询按钮） ── */
    .ys-ts-srow {
        flex-wrap: wrap;
        gap: 4px;
    }
    .ys-ts-search {
        min-width: 0;
    }

    /* ── 新增: 移动端补充样式 ── */

    /* 按钮全宽 */
    .ys-footer .ys-btns {
        width: 100%;
    }
    .ys-btn {
        flex: 1;
        justify-content: center;
    }

    /* 标签文字缩小 */
    .ys-lbl {
        font-size: 11px;
        margin-bottom: 4px;
    }

    /* 输入框缩小高度和内边距 */
    .ys-input {
        height: 36px;
        line-height: 36px;
        padding-left: 28px;
        font-size: 14px;    /* 移动端字体不小于 14px，防止 iOS 缩放 */
    }

    /* 下拉触发栏 */
    .ys-cs-bar, .ys-ts-bar {
        min-height: 36px;
    }
    .ys-cs-text, .ys-ts-text {
        line-height: 36px;
        min-height: 36px;
        padding-left: 28px;
        font-size: 14px;
    }

    /* ★ 下拉面板: 移动端全屏显示
       absolute + width:100% 在窄屏容易溢出
       改为 fixed 全屏铺满 */
    .ys-cs-panel,
    .ys-ts-panel {
        position: fixed;
        left: 8px;
        right: 8px;
        top: auto;
        bottom: 8px;
        width: auto;
        max-height: 60vh;
        border-radius: 12px 12px 8px 8px;
        animation: ysPanelUp .2s ease;
    }
    @keyframes ysPanelUp {
        from { transform: translateY(20px); opacity: 0; }
        to   { transform: translateY(0); opacity: 1; }
    }

    /* 搜索框加大 */
    .ys-cs-search {
        height: 36px;
        line-height: 36px;
        font-size: 14px;
    }
    .ys-ts-search {
        height: 36px;
        line-height: 36px;
        font-size: 14px;
    }

    /* 查询按钮 */
    .ys-ts-sbtn {
        height: 36px;
        font-size: 14px;
        padding: 0 16px;
    }

    /* 选项加大触摸区域 */
    .ys-cs-opt {
        padding: 10px 12px;
        font-size: 14px;
        min-height: 40px;
    }

    /* 树容器 */
    .ys-ts-tree {
        max-height: 45vh;
    }
    .ys-ts-conds {
        padding: 8px 8px 0;
    }
    .ys-ts-cond {
        height: 36px;
        line-height: 36px;
        font-size: 13px;
    }
    .ys-ts-srow {
        padding: 8px;
    }

    /* 搜索条件标签 */
    .ys-ts-conds {
        padding: 8px 8px 0;
    }

    /* 全选/清空 操作栏 */
    .ys-cs-acts {
        padding: 8px 12px;
    }
    .ys-cs-acts a {
        padding: 6px 10px;
        font-size: 13px;
    }

    /* 日期选择器: 移动端居中显示 */
    .ys-dp {
        left: 50% !important;
        transform: translateX(-50%);
        width: calc(100vw - 24px);
        max-width: 320px;
    }

    /* 日期范围输入框 */
    .ys-dr-sep {
        height: 36px;
        line-height: 36px;
    }

    /* 数字范围输入框 */
    .ys-nr-sep {
        height: 36px;
        line-height: 36px;
    }
    .ys-nr .ys-input {
        height: 36px;
        line-height: 36px;
    }

    /* tree-select 加载/提示 */
    .ys-ts-loading-box .ys-ts-loading-text {
        font-size: 14px;
    }
    .ys-ts-tip-box {
        font-size: 14px;
    }
}







/* ============================================================
   日历年/月快速选择
   ============================================================ */

/* 年/月文字可点击 */
.ys-dp-yr,
.ys-dp-mo {
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
}
.ys-dp-yr:hover,
.ys-dp-mo:hover {
    background: #e6f7ff;
    color: #1890ff;
}

/* 年/月选择网格 */
.ys-dp-ym-gd {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 8px 0;
}
.ys-dp-ym-it {
    text-align: center;
    height: 36px;
    line-height: 36px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.1s;
}
.ys-dp-ym-it:hover {
    background: #f0f5ff;
    color: #1890ff;
}
.ys-dp-ym-it.cur {
    background: #1890ff;
    color: #fff;
    font-weight: 500;
}
.ys-dp-ym-it.out {
    color: #bbb;
}

/* 上一年/下一年按钮 */
.ys-dp-py,
.ys-dp-ny {
    font-size: 14px !important;
    font-weight: 700 !important;
}



