/*!
 * liusu.css — 自研组件套件样式（v1.0.0）
 * ============================================================
 * 设计对齐参考 UI：松石绿主色 + 浅灰白底 + 简洁留白
 * 命名：lus- 前缀 BEM，与 liusu / 项目现有样式双轨共存
 * 所有色彩/尺寸走 CSS 变量（设计令牌），便于未来主题化
 */
:root {
    /* ---- 主色（参考 UI --teal） ---- */
    --lus-teal: #0d9488;
    --lus-teal-dark: #0f766e;
    --lus-teal-light: #14b8a6;
    --lus-teal-soft: rgba(13, 148, 136, 0.08);

    /* ---- 语义色 ---- */
    --lus-danger: #e5484d;
    --lus-danger-soft: #fdecec;
    --lus-success: #0a8f4e;
    --lus-success-soft: #e6f7ee;
    --lus-warning: #b45309;
    --lus-warning-soft: #fff7e6;

    /* ---- 中性 ---- */
    --lus-border: #e5e8ef;
    --lus-border-card: #eceef2;
    --lus-text-1: #1f2329;
    --lus-text-2: #646a73;
    --lus-text-3: #8f959e;
    --lus-bg-page: #f5f6fa;
    --lus-bg-hover: #f5f8ff;
    --lus-bg-soft: #f7f8fa;

    /* ---- 间距（参考 UI） ---- */
    --lus-gap-page: 6px;
    --lus-gap-toolbar-v: 9px;
    --lus-gap-toolbar-h: 10px;
    --lus-gap-cell-v: 6px;   /* 单元格垂直内边距：6px（经实测行高≈38px） */
    --lus-gap-cell-h: 10px;
    --lus-gap-pager-v: 7px;
    --lus-gap-pager-h: 10px;

    /* ---- 卡片 ---- */
    --lus-card-radius: 8px;
    --lus-card-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);

    /* ---- 主框架尺寸 ---- */
    --lus-header-h: 52px;
    --lus-tabs-h: 40px;
    --lus-footer-h: 36px;
    --lus-side-w: 200px;

    /* ---- 阴影 ---- */
    --lus-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
    --lus-shadow-md: 0 8px 24px rgba(16, 24, 40, 0.12);
    --lus-shadow-lg: 0 16px 48px rgba(16, 24, 40, 0.22);
}

/* ================= 图标 ================= */
.lus-ic {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
    vertical-align: -2px;
}

/* ================= 按钮 ================= */
.lus-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 32px;
    padding: 0 16px;
    border: 1px solid var(--lus-border);
    border-radius: 6px;
    background: #fff;
    color: var(--lus-text-2);
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    font-family: inherit;
    user-select: none;
    outline: none; /* 去掉弹窗自动聚焦取消按钮时的浏览器默认黑边框 */
}
.lus-btn:hover { color: var(--lus-teal); border-color: var(--lus-teal); background: #fff; }
.lus-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.lus-btn--primary { background: var(--lus-teal); border-color: var(--lus-teal); color: #fff; }
.lus-btn--primary:hover { background: var(--lus-teal-dark); border-color: var(--lus-teal-dark); color: #fff; }
.lus-btn--danger { background: #fff; border-color: var(--lus-border); color: var(--lus-danger); }
.lus-btn--danger:hover { border-color: var(--lus-danger); color: var(--lus-danger); }
.lus-btn--danger-solid { background: var(--lus-danger); border-color: var(--lus-danger); color: #fff; }
.lus-btn--danger-solid:hover { background: #c93a3f; border-color: #c93a3f; color: #fff; }
.lus-btn--text { border-color: transparent; background: transparent; color: var(--lus-teal); padding: 0 6px; }
.lus-btn--text:hover { background: var(--lus-teal-soft); color: var(--lus-teal); }
.lus-btn--sm { height: 34px; padding: 0 14px; font-size: 13px; }
.lus-btn--xs { height: 26px; padding: 0 10px; font-size: 12px; }
.lus-btn--block { width: 100%; }
.lus-btn .lus-ic { width: 14px; height: 14px; }

/* ================= 输入控件 ================= */
.lus-input,
.lus-textarea,
.lus-select {
    width: 100%;
    height: 34px;
    padding: 0 11px;
    border: 1px solid var(--lus-border);
    border-radius: 6px;
    background: #fff;
    color: var(--lus-text-1);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.lus-textarea { height: auto; min-height: 80px; padding: 8px 11px; resize: vertical; line-height: 1.6; }
.lus-input:focus, .lus-textarea:focus, .lus-select:focus {
    border-color: var(--lus-teal);
    box-shadow: 0 0 0 2px var(--lus-teal-soft);
}
.lus-input--sm { height: 30px; font-size: 12.5px; }
.lus-input--md { height: 38px; font-size: 14px; }
.lus-input--lg { height: 44px; font-size: 15px; }
.lus-input--inline { width: auto; }
.lus-input::placeholder { color: var(--lus-text-3); }

/* ================= 卡片 ================= */
.lus-card {
    background: #fff;
    border: var(--lus-card-border, 1px solid #eceef2);
    border-radius: var(--lus-card-radius);
    box-shadow: var(--lus-card-shadow);
}
.lus-card--pad { padding: 20px; }

/* ================= 标签 / 徽章 ================= */
.lus-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 18px;
}
.lus-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.lus-pill--green { background: var(--lus-success-soft); color: var(--lus-success); }
.lus-pill--gray { background: var(--lus-bg-soft); color: #666f7d; }
.lus-pill--danger { background: var(--lus-danger-soft); color: var(--lus-danger); }
.lus-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 3px;
    font-size: 12px;
    line-height: 18px;
}
.lus-badge--green { background: var(--lus-success-soft); color: var(--lus-success); }
.lus-badge--gray { background: var(--lus-bg-soft); color: #666f7d; }
.lus-badge--red { background: var(--lus-danger-soft); color: var(--lus-danger); }
.lus-badge--teal { background: var(--lus-teal-soft); color: var(--lus-teal); }

/* ================= 空状态 ================= */
.lus-empty {
    padding: 56px 0;
    text-align: center;
    color: var(--lus-text-3);
    /* 撑满 td 并在其中垂直/水平居中，与卡片融为一体 */
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}
.lus-empty .lus-ic { width: 40px; height: 40px; color: #d3d9e2; margin: 0 auto 12px; display: block; }
.lus-empty .lus-empty-t { font-size: 14px; margin-bottom: 4px; }
.lus-empty .lus-empty-s { font-size: 12px; }

/* ================= Toast 消息 ================= */
.lus-toast-wrap {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}
.lus-toast {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 420px;
    padding: 10px 18px;
    border-radius: 8px;
    background: #fff;
    color: var(--lus-text-1, #1f2937);
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid var(--lus-border, #e5e8ef);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: auto;
}
.lus-toast.show { opacity: 1; transform: translateY(0); }
.lus-toast .lus-ic { width: 16px; height: 16px; }
/* 清爽浅色提示：按类型着色（白底 + 暖色点缀，避免大面积黑色） */
.lus-toast--success { background: #e8f8f0; border-color: #b9e4cc; color: #0a8f4e; }
.lus-toast--success .lus-ic { color: #0a8f4e; }
.lus-toast--error { background: #fdecec; border-color: #f6c6c6; color: #e5484d; }
.lus-toast--error .lus-ic { color: #e5484d; }
.lus-toast--warn { background: #fff7e6; border-color: #f3d9a4; color: #b45309; }
.lus-toast--warn .lus-ic { color: #b45309; }
.lus-toast--info { background: #f0f6ff; border-color: #d0e4ff; color: #2563eb; }
.lus-toast--info .lus-ic { color: #2563eb; }
.lus-toast--bottom { top: auto; bottom: 24px; }

/* ================= Dialog（confirm / prompt） ================= */
.lus-dialog-mask {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    z-index: 99990;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0s 0.3s;
}
.lus-dialog-mask.show { opacity: 1; visibility: visible; transition: opacity 0.25s ease; }
.lus-dialog {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -46%);
    min-width: 320px;
    max-width: 92vw;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--lus-shadow-lg);
    border: 1px solid var(--lus-border);
    z-index: 99991;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.2s ease, opacity 0.2s ease, visibility 0s 0.3s;
}
.lus-dialog.show { transform: translate(-50%, -50%); opacity: 1; visibility: visible; pointer-events: auto; transition: transform 0.2s ease, opacity 0.2s ease; }
.lus-dialog-head {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 48px;
    padding: 0 16px 0 20px;
    border-bottom: 1px solid var(--lus-border);
    font-size: 15px;
    font-weight: 600;
    color: var(--lus-text-1);
}
.lus-dialog-head::before {
    content: "";
    width: 4px;
    height: 16px;
    border-radius: 2px;
    background: var(--lus-teal);
}
.lus-dialog-body { padding: 20px 24px; font-size: 14px; color: var(--lus-text-1); line-height: 1.7; }
.lus-dialog-body .lus-dialog-msg { color: var(--lus-text-2); }
.lus-dialog-foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid var(--lus-border);
    background: var(--lus-bg-soft);
    border-radius: 0 0 12px 12px;
}
.lus-dialog-foot .lus-btn { height: 32px; }
.lus-dialog--danger .lus-dialog-head::before { background: var(--lus-danger); }

/* ================= Loading ================= */
.lus-loading-mask {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.35);
    z-index: 99995;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
}
.lus-loading-mask.show { opacity: 1; visibility: visible; }
.lus-loading-mask--shade { background: rgba(0, 0, 0, 0.12); }
.lus-loading-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--lus-teal-soft);
    border-top-color: var(--lus-teal);
    border-radius: 50%;
    animation: lus-spin 0.8s linear infinite;
}
.lus-loading-text { font-size: 13px; color: var(--lus-text-2); }
@keyframes lus-spin { to { transform: rotate(360deg); } }
/* 局部加载 */
.lus-loading-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 13px;
    color: var(--lus-text-2);
}
.lus-loading-inline .lus-loading-spinner { width: 16px; height: 16px; border-width: 2px; }

/* ================= Modal ================= */
.lus-modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    z-index: 99990;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0s 0.3s;
}
.lus-modal-mask.show { opacity: 1; visibility: visible; transition: opacity 0.25s ease; }
.lus-modal {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -46%);
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--lus-shadow-lg);
    border: 1px solid var(--lus-border);
    z-index: 99991;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    max-width: 96vw;
    max-height: 94vh;
    transition: transform 0.2s ease, opacity 0.2s ease, visibility 0s 0.3s;
}
.lus-modal.show { transform: translate(-50%, -50%); opacity: 1; visibility: visible; pointer-events: auto; transition: transform 0.2s ease, opacity 0.2s ease; }
.lus-modal-head {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 50px;
    padding: 0 14px 0 20px;
    border-bottom: 1px solid var(--lus-border);
    background: var(--lus-bg-soft);
    border-radius: 12px 12px 0 0;
    flex-shrink: 0;
}
.lus-modal-head h3 { font-size: 15px; font-weight: 600; color: var(--lus-text-1); flex: 1; display: flex; align-items: center; gap: 8px; margin: 0; }
.lus-modal-head h3::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--lus-teal); }
.lus-modal-close {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: var(--lus-text-2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.lus-modal-close:hover { background: #e4e8ef; color: var(--lus-text-1); }
/* 关闭按钮去焦点边框：鼠标点击会有 hover 反馈，键盘用户靠 :focus-visible 自动保留可访问性环 */
.lus-modal-close:focus { outline: none; }
.lus-modal-close:focus-visible { outline: 2px solid var(--lus-teal); outline-offset: 1px; }
.lus-modal-body { flex: 1; min-height: 0; overflow: auto; padding: 0; }
.lus-modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid var(--lus-border);
    background: var(--lus-bg-soft);
    border-radius: 0 0 12px 12px;
    flex-shrink: 0;
}

/* ================= 表单系统 ================= */
.lus-form-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
}
.lus-form-item:last-child { margin-bottom: 0; }
.lus-form-label {
    flex: 0 0 auto;
    width: 100px;
    padding-right: 12px;
    text-align: right;
    font-size: 13px;
    color: var(--lus-text-2);
    line-height: 32px;
    height: 32px;
    box-sizing: border-box;
}
.lus-form-label .lus-req { color: var(--lus-danger); margin-right: 2px; font-weight: bold; }
.lus-form-control { flex: 0 0 240px; width: 240px; min-width: 0; }
.lus-form-control--full { flex: 1; width: auto; }
.lus-form-control--sm { flex-basis: 160px; width: 160px; }
.lus-form-control--md { flex-basis: 240px; width: 240px; }
.lus-form-control--lg { flex-basis: 320px; width: 320px; }
.lus-form-tip { font-size: 12px; color: var(--lus-text-3); line-height: 32px; padding-left: 8px; }
.lus-form-error { font-size: 12px; color: var(--lus-danger); line-height: 1.4; padding-top: 4px; }
.lus-input.lus-input--error, .lus-textarea.lus-textarea--error { border-color: var(--lus-danger); }
.lus-form-actions { margin-top: 8px; display: flex; gap: 8px; justify-content: flex-end; }

/* ---- 自绘 checkbox / radio ---- */
.lus-check, .lus-radio {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    cursor: pointer;
    font-size: 13px;
    color: var(--lus-text-1);
    user-select: none;
    margin-right: 14px;
    vertical-align: middle;
}
.lus-check input, .lus-radio input { position: absolute; opacity: 0; width: 0; height: 0; }
.lus-check .lus-check-box {
    width: 15px;
    height: 15px;
    border: 1px solid var(--lus-border);
    border-radius: 4px;
    background: #fff;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
.lus-check .lus-check-box .lus-ic { width: 11px; height: 11px; stroke-width: 3; opacity: 0; color: #fff; }
.lus-check input:checked + .lus-check-box { background: var(--lus-teal); border-color: var(--lus-teal); }
.lus-check input:checked + .lus-check-box .lus-ic { opacity: 1; }
.lus-check input:focus-visible + .lus-check-box { box-shadow: 0 0 0 3px var(--lus-teal-soft); }
.lus-check input:indeterminate + .lus-check-box { background: var(--lus-teal); border-color: var(--lus-teal); }
.lus-check input:indeterminate + .lus-check-box .lus-ic { opacity: 1; color: #fff; }
.lus-radio .lus-check-box { border-radius: 50%; }
.lus-radio input:checked + .lus-check-box { background: #fff; border-color: var(--lus-teal); box-shadow: inset 0 0 0 4px var(--lus-teal); }

/* ---- 自定义下拉 cselect ---- */
.lus-cselect { position: relative; display: inline-block; flex-shrink: 0; }
.lus-cselect-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    height: 34px;
    min-width: 112px;
    padding: 0 10px;
    border: 1px solid var(--lus-border);
    border-radius: 6px;
    background: #fff;
    color: var(--lus-text-1);
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.15s;
    user-select: none;
}
.lus-cselect-trigger:hover { border-color: var(--lus-teal); }
.lus-cselect-trigger .lus-ic { width: 12px; height: 12px; color: var(--lus-text-3); transition: transform 0.15s; }
.lus-cselect.open .lus-cselect-trigger .lus-ic { transform: rotate(180deg); }
.lus-cselect-pop {
    position: absolute;
    top: 38px;
    left: 0;
    min-width: 100%;
    background: #fff;
    border: 1px solid var(--lus-border);
    border-radius: 6px;
    box-shadow: var(--lus-shadow-md);
    z-index: 1000;
    padding: 6px;
    display: none;
}
.lus-cselect-pop.show { display: block; }
/* 空间不足自动向上展开（form.js openPop 检测后加 .up；单据底部下拉不会被裁剪） */
.lus-cselect-pop.up { top: auto; bottom: 38px; }
.lus-cselect-opt {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 10px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--lus-text-2);
    cursor: pointer;
    white-space: nowrap;
}
.lus-cselect-opt:hover { background: var(--lus-bg-hover); color: var(--lus-teal); }
.lus-cselect-opt.active { background: var(--lus-teal-soft); color: var(--lus-teal); font-weight: 500; }
.lus-cselect-opt.active::after { content: "✓"; margin-left: auto; font-size: 12px; color: var(--lus-teal); }
/* 单选下拉搜索（ls-search 触发，如会员下拉；lay-search 为历史兼容名）：
   pop 内分为搜索框 + 选项列表两个容器，选项列表独立滚动，搜索框固定 */
.lus-cselect-list { max-height: 220px; overflow-y: auto; }
.lus-cselect-search {
    box-sizing: border-box;
    width: 100%;
    height: 30px;
    margin-bottom: 4px;
    padding: 0 10px;
    border: 1px solid var(--lus-border);
    border-radius: 6px;
    font-size: 13px;
    background: var(--lus-bg-soft);
    outline: none;
}
.lus-cselect-search:focus { border-color: var(--lus-teal); background: #fff; }
.lus-cselect-empty { padding: 12px 10px; text-align: center; font-size: 12px; color: var(--lus-text-3); }

/* ---- 多选下拉 multiSelect（替代 xm-select） ---- */
.lus-ms { position: relative; display: block; width: 100%; flex-shrink: 0; }
.lus-ms-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--lus-border);
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.15s;
    user-select: none;
    box-sizing: border-box;
}
.lus-ms-trigger:hover { border-color: var(--lus-teal); }
.lus-ms-trigger .lus-ic { width: 12px; height: 12px; color: var(--lus-text-3); transition: transform 0.15s; flex-shrink: 0; }
.lus-ms.open .lus-ms-trigger { border-color: var(--lus-teal); }
.lus-ms.open .lus-ms-trigger .lus-ic { transform: rotate(180deg); }
.lus-ms-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--lus-text-3); }
.lus-ms-label.has { color: var(--lus-text-1); }
.lus-ms-pop {
    position: absolute;
    top: 38px;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--lus-border);
    border-radius: 6px;
    box-shadow: var(--lus-shadow-md);
    z-index: 1000;
    padding: 6px;
    display: none;
    box-sizing: border-box;
}
.lus-ms.open .lus-ms-pop { display: flex; flex-direction: column; }
.lus-ms-search {
    height: 30px;
    border: 1px solid var(--lus-border);
    border-radius: 6px;
    padding: 0 8px;
    font-size: 12px;
    margin-bottom: 6px;
    box-sizing: border-box;
    outline: none;
    color: var(--lus-text-1);
}
.lus-ms-search:focus { border-color: var(--lus-teal); }
.lus-ms-list { overflow-y: auto; max-height: 220px; }
.lus-ms-item {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 30px;
    padding: 0 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--lus-text-2);
}
.lus-ms-item:hover { background: var(--lus-bg-hover); }
.lus-ms-item input { position: absolute; opacity: 0; width: 0; height: 0; }
.lus-ms-item .lus-check-box {
    width: 15px;
    height: 15px;
    border: 1px solid var(--lus-border);
    border-radius: 4px;
    background: #fff;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
.lus-ms-item .lus-check-box .lus-ic { width: 10px; height: 10px; stroke-width: 3; opacity: 0; color: #fff; }
.lus-ms-item input:checked + .lus-check-box { background: var(--lus-teal); border-color: var(--lus-teal); }
.lus-ms-item input:checked + .lus-check-box .lus-ic { opacity: 1; }
.lus-ms-item-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- 权限树（checkbox 联动） ---- */
.lus-perm-tree { border: 1px solid var(--lus-border); border-radius: 6px; overflow: hidden; background: #fff; }
.lus-perm-head { display: flex; background: var(--lus-bg-soft); border-bottom: 1px solid var(--lus-border); }
.lus-perm-head > div { padding: 8px 12px; font-size: 12px; color: var(--lus-danger); font-weight: 600; }
.lus-perm-mod-row { display: flex; border-bottom: 1px solid #f0f0f0; }
.lus-perm-mod-row:last-child { border-bottom: none; }
.lus-perm-col-left {
    width: 150px;
    flex-shrink: 0;
    text-align: center;
    border-right: 1px solid var(--lus-border);
    padding: 12px 10px;
    font-weight: 700;
    background: #fafbfc;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lus-perm-col-right { padding: 6px 12px; flex: 1; }
.lus-perm-menu { border-bottom: 1px dashed #eee; padding: 6px 0; }
.lus-perm-menu:last-child { border-bottom: none; }
.lus-perm-menu-head { display: flex; align-items: center; gap: 6px; padding: 4px 0; font-weight: 600; color: #4a5568; }
.lus-perm-btns { display: flex; flex-wrap: wrap; gap: 2px 12px; padding: 4px 0 4px 28px; }

/* ================= Grid 表格 ================= */
/* 对齐 UI 参考稿：width:100% 列少时占满容器；列多时表格自然超宽，由 .lus-grid-scroll 横向滚动 + 操作列 sticky 固定 */
.lus-grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.lus-grid th {
    background: var(--lus-bg-soft);
    color: var(--lus-text-2);
    font-weight: 500;
    text-align: center;
    padding: var(--lus-gap-cell-v) var(--lus-gap-cell-h);
    border-right: 1px solid #e4e7ee;
    border-bottom: 1px solid #dde1e8;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 2;
    vertical-align: middle;
}
.lus-grid td {
    padding: var(--lus-gap-cell-v) var(--lus-gap-cell-h);
    border-right: 1px solid #eef0f3;
    border-bottom: 1px solid #eef0f3;
    white-space: nowrap;
    vertical-align: middle;
    text-align: center;
    color: var(--lus-text-1);
}
.lus-grid th:first-child, .lus-grid td:first-child { border-left: 1px solid #e4e7ee; }
.lus-grid tbody tr:hover td { background: var(--lus-bg-hover); }
.lus-grid tbody tr.lus-grid-row-selected td { background: var(--lus-teal-soft); }
.lus-grid th.lus-grid-sortable { cursor: pointer; user-select: none; }
.lus-grid th.lus-grid-sortable:hover { color: var(--lus-teal); }
.lus-grid th .lus-sa { display: inline-block; width: 0; height: 0; margin-left: 4px; vertical-align: 2px; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 5px solid #c9cdd4; transition: 0.15s; }
.lus-grid th.lus-grid-asc .lus-sa { border-bottom-color: var(--lus-teal); }
.lus-grid th.lus-grid-desc .lus-sa { border-top: 5px solid var(--lus-teal); border-bottom: none; }
.lus-grid th.lus-grid-fixed-right, .lus-grid td.lus-grid-fixed-right { position: sticky; right: 0; background: #fff; z-index: 3; }
.lus-grid th.lus-grid-fixed-left, .lus-grid td.lus-grid-fixed-left { position: sticky; left: 0; background: #fff; z-index: 3; }
.lus-grid th.lus-grid-fixed-right, .lus-grid th.lus-grid-fixed-left { top: 0; z-index: 10 !important; background: var(--lus-bg-soft); }
.lus-grid th.lus-grid-fixed-right { border-left: 1px solid #e4e7ee; }
.lus-grid th.lus-grid-fixed-left { border-right: 1px solid #e4e7ee; }
.lus-grid tbody tr:hover td.lus-grid-fixed-right, .lus-grid tbody tr:hover td.lus-grid-fixed-left { background: var(--lus-bg-hover); }
.lus-grid tbody tr.lus-grid-row-selected td.lus-grid-fixed-right, .lus-grid tbody tr.lus-grid-row-selected td.lus-grid-fixed-left { background: var(--lus-teal-soft); }
.lus-grid .lus-grid-check { width: 16px; height: 16px; accent-color: var(--lus-teal); cursor: pointer; vertical-align: -2px; }
.lus-grid .lus-grid-loading-row td { text-align: center; color: var(--lus-text-3); padding: 30px 0; }
.lus-grid .lus-grid-link { color: var(--lus-teal); font-size: 13px; padding: 2px 6px; border-radius: 4px; cursor: pointer; }
.lus-grid .lus-grid-link:hover { background: var(--lus-teal-soft); }
.lus-grid .lus-grid-link--danger { color: var(--lus-danger); }
.lus-grid .lus-grid-link--danger:hover { background: var(--lus-danger-soft); }
.lus-grid .lus-grid-sep { color: var(--lus-border); margin: 0 2px; }

/* ================= 分页 ================= */
.lus-pager {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: var(--lus-gap-pager-v) var(--lus-gap-pager-h);
    justify-content: flex-end;
    border-top: 1px solid var(--lus-border);
    flex-shrink: 0;
}
.lus-pager-info { font-size: 12.5px; color: var(--lus-text-3); margin-right: auto; }
.lus-pager-btn {
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    border: 1px solid var(--lus-border);
    background: #fff;
    color: var(--lus-text-2);
    border-radius: 6px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}
.lus-pager-btn:hover:not(:disabled):not(.active) { color: var(--lus-teal); border-color: var(--lus-teal); }
.lus-pager-btn.active { background: var(--lus-teal); color: #fff; border-color: transparent; }
.lus-pager-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.lus-pager-btn .lus-ic { width: 14px; height: 14px; }
.lus-pager-size {
    border: 1px solid var(--lus-border);
    border-radius: 6px;
    height: 30px;
    padding: 0 6px;
    font-size: 12.5px;
    color: var(--lus-text-2);
    outline: none;
    cursor: pointer;
    background: #fff;
    font-family: inherit;
}
.lus-pager-size:hover { border-color: var(--lus-teal); color: var(--lus-teal); }
.lus-pager-jump { display: flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--lus-text-3); margin-left: 6px; white-space: nowrap; }
.lus-pager-jump input {
    width: 48px;
    height: 30px;
    border: 1px solid var(--lus-border);
    border-radius: 6px;
    padding: 0 6px;
    font-size: 12.5px;
    color: var(--lus-text-1);
    text-align: center;
    outline: none;
    font-family: inherit;
}
.lus-pager-jump input:focus { border-color: var(--lus-teal); box-shadow: 0 0 0 2px var(--lus-teal-soft); }
/* 隐藏数字输入框上下箭头（对齐参考 UI，页码输入框简洁样式） */
.lus-pager-jump input::-webkit-outer-spin-button,
.lus-pager-jump input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.lus-pager-jump input[type=number] { -moz-appearance: textfield; appearance: textfield; }

/* ================= 日期面板 ================= */
.lus-date-input-wrap { position: relative; }
.lus-date-input-wrap .lus-ic { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--lus-text-3); pointer-events: none; }
.lus-date-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 264px;
    background: #fff;
    border: 1px solid var(--lus-border);
    border-radius: 8px;
    box-shadow: var(--lus-shadow-md);
    z-index: 1100;
    padding: 8px;
    display: none;
}
.lus-date-panel.show { display: block; }
.lus-date-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px 8px; }
.lus-date-nav { width: 26px; height: 26px; border: none; background: transparent; border-radius: 6px; cursor: pointer; color: var(--lus-text-2); display: flex; align-items: center; justify-content: center; font-family: inherit; font-size: 20px; line-height: 1; font-weight: 400; padding: 0 0 3px; }
.lus-date-nav:hover { background: var(--lus-bg-soft); color: var(--lus-teal); }
.lus-date-title { font-size: 13px; font-weight: 600; color: var(--lus-text-1); border: none; background: transparent; cursor: pointer; padding: 2px 8px; border-radius: 6px; line-height: 1.6; font-family: inherit; }
.lus-date-title:hover { background: var(--lus-bg-soft); color: var(--lus-teal); }
.lus-date-year-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 4px 0 2px; }
.lus-date-year { height: 32px; line-height: 32px; text-align: center; font-size: 13px; color: var(--lus-text-1); border-radius: 6px; cursor: pointer; }
.lus-date-year:hover { background: var(--lus-bg-hover); color: var(--lus-teal); }
.lus-date-year.active { background: var(--lus-teal); color: #fff; font-weight: 600; }
.lus-date-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.lus-date-grid .lus-date-wd { font-size: 11px; color: var(--lus-text-3); height: 24px; line-height: 24px; }
.lus-date-grid .lus-date-day { height: 28px; line-height: 28px; font-size: 12.5px; color: var(--lus-text-1); border-radius: 6px; cursor: pointer; }
.lus-date-grid .lus-date-day:hover { background: var(--lus-bg-hover); color: var(--lus-teal); }
.lus-date-grid .lus-date-day.other { color: var(--lus-text-3); opacity: 0.5; }
.lus-date-grid .lus-date-day.today { color: var(--lus-teal); font-weight: 600; }
.lus-date-grid .lus-date-day.active { background: var(--lus-teal); color: #fff; }

/* ================= Tabs 选项卡（主框架） ================= */
.lus-tabs { display: flex; flex-direction: column; width: 100%; height: 100%; background: var(--lus-bg-page); }
.lus-tabs-bar {
    display: flex;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid var(--lus-border);
    height: var(--lus-tabs-h);
    padding: 0 8px;
    flex-shrink: 0;
    gap: 2px;
}
.lus-tabs-scroll { flex: 1; overflow-x: auto; display: flex; align-items: center; gap: 2px; scrollbar-width: none; min-width: 0; }
.lus-tabs-scroll::-webkit-scrollbar { display: none; }
.lus-tab {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 30px;
    padding: 0 6px 0 10px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--lus-text-2);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: 0.15s;
    user-select: none;
}
.lus-tab:hover { background: var(--lus-bg-soft); }
.lus-tab.active { background: var(--lus-teal-soft); color: var(--lus-teal); font-weight: 500; }
.lus-tab .lus-tab-close { width: 16px; height: 16px; border-radius: 4px; display: flex; align-items: center; justify-content: center; color: var(--lus-text-3); opacity: 0; transition: 0.15s; }
.lus-tab:hover .lus-tab-close { opacity: 1; }
.lus-tab .lus-tab-close:hover { background: rgba(0, 0, 0, 0.12); color: var(--lus-text-1); }
.lus-tab .lus-tab-close .lus-ic { width: 12px; height: 12px; }
.lus-tabs-tools { display: flex; align-items: center; gap: 4px; padding-left: 8px; border-left: 1px solid var(--lus-border); margin-left: 4px; flex-shrink: 0; }
.lus-tabs-tools .lus-tb-btn { width: 26px; height: 26px; border-radius: 6px; font-size: 12px; color: var(--lus-text-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.lus-tabs-tools .lus-tb-btn:hover { background: #f0f1f3; color: var(--lus-teal); }
.lus-tabs-content { flex: 1; min-height: 0; position: relative; background: var(--lus-bg-page); }

/* ================= Drawer 抽屉 ================= */
.lus-drawer-mask {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.25s ease, visibility 0s 0.3s;
    z-index: 10;
}
.lus-drawer-mask.show { visibility: visible; opacity: 1; transition: opacity 0.25s ease; }
.lus-drawer {
    position: absolute;
    left: 50%;
    top: 50%;
    background: #fff;
    box-shadow: var(--lus-shadow-lg);
    border: 1px solid var(--lus-border);
    border-radius: 12px;
    z-index: 15;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-width: 98%;
    max-height: 95%;
    min-width: 420px;
    min-height: 200px;
    transition: transform 0.42s cubic-bezier(0.3, 1.25, 0.55, 1), opacity 0.32s ease;
    opacity: 0;
    pointer-events: none;
    transform: translate(calc(-50% + 150%), -50%);
}
.lus-drawer.show { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.lus-drawer.maximized { max-width: 100% !important; max-height: 100% !important; width: 100% !important; height: 100% !important; border-radius: 0 !important; border: none !important; }
.lus-drawer-head {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 50px;
    padding: 0 14px 0 20px;
    border-bottom: 1px solid var(--lus-border);
    flex-shrink: 0;
    background: #fafcfe;
    border-radius: 12px 12px 0 0;
}
.lus-drawer-head h3 { font-size: 15px; font-weight: 600; color: var(--lus-text-1); margin: 0; display: flex; align-items: center; gap: 8px; flex: 1; }
.lus-drawer-head h3::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--lus-teal); }
.lus-drawer-head .lus-drawer-btn { width: 28px; height: 28px; border: none; background: #f2f4f8; border-radius: 6px; cursor: pointer; color: #4d5f72; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
.lus-drawer-head .lus-drawer-btn:hover { background: #e4e8ef; }
.lus-drawer-body { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; background: #fff; }
.lus-drawer-foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid var(--lus-border);
    flex-shrink: 0;
    background: #fafcfe;
    border-radius: 0 0 12px 12px;
}

/* ================= Menu 侧栏菜单 ================= */
.lus-menu { padding: 0 8px 10px; }
.lus-menu .lus-menu-item { position: relative; margin: 2px 0; border-radius: 8px; }
.lus-menu .lus-menu-link {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    color: #4a5568;
    font-size: 14px;
    cursor: pointer;
    position: relative;
    z-index: 0;
    transition: color 0.15s;
    white-space: nowrap;
    text-decoration: none;
    font-family: inherit;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}
.lus-menu .lus-menu-link .lus-ic { width: 16px; height: 16px; }
.lus-menu .lus-menu-link .lus-menu-txt { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.lus-menu .lus-menu-link .lus-menu-arrow { width: 13px; height: 13px; transition: transform 0.2s; margin-left: auto; }
.lus-menu .lus-menu-item.open > .lus-menu-link .lus-menu-arrow { transform: rotate(90deg); }
.lus-menu .lus-menu-item.active > .lus-menu-link { color: var(--lus-teal); font-weight: 500; }
.lus-menu .lus-menu-link::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 50%;
    transform: translateY(-50%);
    height: 28px;
    border-radius: 8px;
    background: transparent;
    transition: background 0.15s;
    z-index: -1;
}
.lus-menu .lus-menu-link:hover::before { background: var(--lus-bg-soft); }
.lus-menu .lus-menu-item.active > .lus-menu-link::before { background: var(--lus-teal-soft); }
.lus-menu .lus-menu-sub { display: none; padding-left: 12px; }
.lus-menu .lus-menu-item.open > .lus-menu-sub { display: block; }
.lus-menu .lus-menu-sub .lus-menu-link { height: 36px; font-size: 13.5px; color: #6b7280; padding: 0 12px; }
.lus-menu .lus-menu-sub .lus-menu-link::before { height: 26px; }
.lus-menu .lus-menu-sub .lus-menu-link .lus-menu-dot { width: 5px; height: 5px; border-radius: 50%; background: #d1d5db; flex-shrink: 0; }
.lus-menu .lus-menu-sub .lus-menu-item.active > .lus-menu-link { color: var(--lus-teal); font-weight: 500; }
.lus-menu .lus-menu-sub .lus-menu-item.active > .lus-menu-link::before { background: var(--lus-teal-soft); }
.lus-menu .lus-menu-sub .lus-menu-item.active > .lus-menu-link::after {
    content: "";
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 3px; height: 14px;
    border-radius: 2px;
    background: var(--lus-teal);
    z-index: -1;
}

/* ================= 通用工具类 ================= */
.lus-hide { display: none !important; }
.lus-flex { display: flex; }
.lus-flex-center { display: flex; align-items: center; justify-content: center; }
.lus-grow { flex: 1; }
.lus-muted { color: var(--lus-text-3); }
.lus-sep { width: 1px; height: 20px; background: var(--lus-border); margin: 0 4px; }
.lus-scroll-x { overflow-x: auto; }
.lus-mono { font-family: 'JetBrainsMono', "Courier New", monospace; }

/* ================= v2.0 增强：Toast 位置/关闭 ================= */
.lus-toast-wrap--top { top: 24px; bottom: auto; }
.lus-toast-wrap--bottom { top: auto; bottom: 24px; }
.lus-toast-wrap--center { top: 50%; bottom: auto; }
.lus-toast-close {
    width: 18px; height: 18px; border: none; background: transparent; cursor: pointer;
    color: currentColor; opacity: .55; border-radius: 4px;
    display: inline-flex; align-items: center; justify-content: center; padding: 0; flex-shrink: 0;
}
.lus-toast-close:hover { opacity: 1; background: rgba(0,0,0,.08); }
.lus-toast-close .lus-ic { width: 12px; height: 12px; }

/* ================= v2.0 增强：Switch 开关 ================= */
.lus-switch { display: inline-flex; align-items: center; cursor: pointer; vertical-align: middle; }
.lus-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.lus-switch-track {
    width: 40px; height: 22px; border-radius: 999px; background: #d1d5db;
    position: relative; transition: background .2s; flex-shrink: 0;
}
.lus-switch-track::after {
    content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
    border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25);
    transition: left .2s;
}
.lus-switch.on .lus-switch-track { background: var(--lus-teal); }
.lus-switch.on .lus-switch-track::after { left: 20px; }
.lus-switch:focus-within .lus-switch-track { box-shadow: 0 0 0 3px var(--lus-teal-soft); }

/* ================= v2.0 增强：Tooltip ================= */
.lus-tip {
    position: fixed; z-index: 100100; padding: 6px 10px; border-radius: 6px;
    background: rgba(17, 24, 39, 0.92); color: #fff; font-size: 12px; line-height: 1.5;
    max-width: 280px; opacity: 0; visibility: hidden; transition: opacity .15s;
    pointer-events: none; white-space: nowrap;
}
.lus-tip.show { opacity: 1; visibility: visible; }

/* ================= v2.0 增强：Dropdown 下拉菜单 ================= */
.lus-dropdown {
    position: fixed; z-index: 100100; background: #fff; border: 1px solid var(--lus-border);
    border-radius: 8px; box-shadow: var(--lus-shadow-md); padding: 5px; min-width: 120px;
    opacity: 0; visibility: hidden; transform: translateY(-4px); transition: .15s;
}
.lus-dropdown.show { opacity: 1; visibility: visible; transform: none; }
.lus-dropdown-item {
    display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px;
    border-radius: 6px; font-size: 13px; color: var(--lus-text-2); cursor: pointer;
    white-space: nowrap;
}
.lus-dropdown-item:hover, .lus-dropdown-item:focus { background: var(--lus-bg-hover); color: var(--lus-teal); outline: none; }
.lus-dropdown-item.danger { color: var(--lus-danger); }
.lus-dropdown-item.danger:hover { background: var(--lus-danger-soft); color: var(--lus-danger); }
.lus-dropdown-item.disabled { opacity: .5; cursor: not-allowed; }
.lus-dropdown-item .lus-ic { width: 14px; height: 14px; }

/* ================= v2.0 增强：Grid 工具条 / 列设置 / 拖拽 / 骨架 / 汇总 / 树 / 编辑 ================= */
.lus-grid-toolbar {
    display: flex; justify-content: flex-end; gap: 8px; padding: 8px 10px 4px;
    min-height: 0; position: relative; flex-shrink: 0;
}
/* 列设置按钮：按钮式（lus-btn lus-btn-sm btn-gray），此处仅补齐图标/行高细节 */
.lus-grid-cols-btn { flex-shrink: 0; }
.lus-grid-cols-btn .lus-ic { width: 14px; height: 14px; }
.lus-col-setting {
    position: absolute; top: 38px; right: 10px; z-index: 1100; background: #fff;
    border: 1px solid var(--lus-border); border-radius: 8px; box-shadow: var(--lus-shadow-md);
    padding: 8px; display: none; min-width: 160px; max-height: 280px; overflow-y: auto;
}
.lus-col-setting.show { display: block; }
.lus-col-setting-title { font-size: 12px; color: var(--lus-text-3); padding: 2px 6px 6px; }
.lus-col-setting-item {
    display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 6px;
    border-radius: 6px; font-size: 13px; color: var(--lus-text-1); cursor: pointer;
}
.lus-col-setting-item:hover { background: var(--lus-bg-hover); }
.lus-col-setting-item input { accent-color: var(--lus-teal); }
/* 列宽拖拽（th 本身已是 sticky 定位元素，子手柄 absolute 相对其定位） */
.lus-col-resize { position: absolute; top: 0; right: -4px; width: 8px; height: 100%; cursor: col-resize; z-index: 4; }
body.lus-resizing, body.lus-resizing * { cursor: col-resize !important; user-select: none; }
/* 骨架屏 */
.lus-grid-skeleton { padding: 16px 8px; }
.lus-grid-skeleton i {
    display: block; height: 12px; margin: 0 4px 12px; border-radius: 6px;
    background: linear-gradient(90deg, #eef0f3 25%, #f7f8fa 37%, #eef0f3 63%);
    background-size: 400% 100%; animation: lus-shimmer 1.2s ease infinite;
}
@keyframes lus-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
/* 刷新/翻页时保留旧数据，仅做淡化 + 顶部进度条反馈，避免骨架屏条纹闪现 */
/* 修复：补 overflow-x:auto 恢复横向滚动（列宽和超出容器时出现滚动条，配合 .lus-grid 的 max-content） */
.lus-grid-scroll { position: relative; overflow-x: auto; }
/* 滚动条样式（对齐 UI 参考稿 .tbl-scroll） */
.lus-grid-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.lus-grid-scroll::-webkit-scrollbar-thumb { background: #e2e6ec; border-radius: 4px; }
.lus-grid-updating tbody { opacity: .55; transition: opacity .15s ease; }
.lus-grid-updating .lus-grid-scroll::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; z-index: 6;
    background: linear-gradient(90deg, transparent, var(--lus-teal, #0d9488), transparent);
    animation: lus-topbar .9s ease infinite;
}
@keyframes lus-topbar { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
/* 汇总行 */
.lus-grid tfoot td {
    background: var(--lus-bg-soft); font-weight: 600; color: var(--lus-text-1);
    border-top: 1px solid #dde1e8;
}
.lus-grid tfoot:empty { display: none; }
/* 树形
 * 层级可视化：每级 26px 缩进 + 引导线（文件管理器风格，竖线+横线连接父子）
 * 一级(根)无引导线；二级起按 data-depth 画竖线（含所有祖先竖线，box-shadow 偏移）+ 自身横线
 * 注意：颜色和粗细必须与白底有足够对比（之前 #dfe3ea 1px 太浅，用户反馈看不出层级）
 */
.lus-tree-toggle {
    display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px;
    margin-right: 4px; vertical-align: middle; line-height: 0; cursor: pointer; color: var(--lus-text-2);
    border-radius: 4px; background: rgba(0,0,0,.04); transition: all .15s;
}
.lus-tree-toggle:hover { background: var(--lus-bg-soft); color: var(--lus-teal); }
.lus-tree-toggle .lus-ic { width: 12px; height: 12px; }
/* 无子级节点：小圆点标识（与箭头同一盒模型与对齐方式，保证与文字垂直居中） */
.lus-tree-empty {
    display: inline-flex; align-items: center; justify-content: center;
    width: 16px; height: 16px; margin-right: 4px; vertical-align: middle; line-height: 0;
}
.lus-tree-empty::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%;
    background: var(--lus-tree-dot, #9aa3b0);
}
.lus-tree-cell { text-align: left !important; position: relative; }
/* 引导线：竖线（含祖先层）+ 横线连接节点——2px 粗，颜色适中（比 #dfe3ea 深、比 #94a3b8 浅） */
.lus-tree-cell[data-depth]:not([data-depth="0"])::before,
.lus-tree-cell[data-depth]:not([data-depth="0"])::after {
    content: ''; position: absolute; background: var(--lus-tree-line, #a9b3c0); pointer-events: none;
}
.lus-tree-cell[data-depth]:not([data-depth="0"])::before { top: 0; bottom: 0; width: 2px; }
.lus-tree-cell[data-depth]:not([data-depth="0"])::after { top: 50%; height: 2px; }
/* 各级线位置：箭头中心 12+8=20px，每级间隔 26px；横线从竖线到节点（宽18px） */
.lus-tree-cell[data-depth="1"]::before { left: 20px; }
.lus-tree-cell[data-depth="1"]::after  { left: 20px; width: 18px; }
.lus-tree-cell[data-depth="2"]::before { left: 46px; box-shadow: -26px 0 0 0 var(--lus-tree-line, #a9b3c0); }
.lus-tree-cell[data-depth="2"]::after  { left: 46px; width: 18px; }
.lus-tree-cell[data-depth="3"]::before { left: 72px; box-shadow: -26px 0 0 0 var(--lus-tree-line, #a9b3c0), -52px 0 0 0 var(--lus-tree-line, #a9b3c0); }
.lus-tree-cell[data-depth="3"]::after  { left: 72px; width: 18px; }
.lus-tree-cell[data-depth="4"]::before { left: 98px; box-shadow: -26px 0 0 0 var(--lus-tree-line, #a9b3c0), -52px 0 0 0 var(--lus-tree-line, #a9b3c0), -78px 0 0 0 var(--lus-tree-line, #a9b3c0); }
.lus-tree-cell[data-depth="4"]::after  { left: 98px; width: 18px; }
/* 一级（根节点）强调：加粗 + 次级灰（不刺眼的黑，菜单风格；层级靠缩进/引导线/加粗区分） */
.lus-tree-cell[data-depth="0"] { font-weight: 600; color: var(--lus-text-2); }
/* 子级行加细微灰底条纹，与一级形成对比 */
.lus-tree-cell[data-depth]:not([data-depth="0"]) { font-weight: 400; }
/* 表格行悬停时引导线颜色加深，配合 hover 反馈 */
.lus-grid tr:hover .lus-tree-cell[data-depth]:not([data-depth="0"])::before,
.lus-grid tr:hover .lus-tree-cell[data-depth]:not([data-depth="0"])::after { background: var(--lus-teal, #0d9488); }
/* 虚拟滚动占位 */
.lus-grid-spacer td { border: 0 !important; padding: 0 !important; }
/* 单元格编辑 */
.lus-grid-edit { min-height: 22px; padding: 0 4px; border-radius: 4px; cursor: text; }
.lus-grid-edit:hover { background: rgba(13, 148, 136, 0.06); outline: 1px dashed rgba(13, 148, 136, 0.4); }
.lus-grid-edit-input { height: 26px !important; padding: 0 6px !important; font-size: 13px !important; }

/* ================= v2.0 增强：Upload 文件列表 ================= */
.lus-upload-list { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.lus-upload-item { border: 1px solid var(--lus-border); border-radius: 8px; padding: 8px 10px; background: #fff; }
.lus-upload-main { display: flex; align-items: center; gap: 10px; }
.lus-upload-thumb { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.lus-upload-ic {
    width: 36px; height: 36px; border-radius: 6px; background: var(--lus-bg-soft);
    color: var(--lus-text-3); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.lus-upload-ic .lus-ic { width: 18px; height: 18px; }
.lus-upload-info { flex: 1; min-width: 0; }
.lus-upload-name { font-size: 13px; color: var(--lus-text-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lus-upload-meta { font-size: 11px; color: var(--lus-text-3); margin-top: 1px; }
.lus-upload-progress { height: 4px; background: var(--lus-bg-soft); border-radius: 2px; margin-top: 5px; overflow: hidden; display: none; }
.lus-upload-item.uploading .lus-upload-progress { display: block; }
.lus-upload-bar { display: block; height: 100%; background: var(--lus-teal); width: 0; transition: width .2s; }
.lus-upload-status { font-size: 12px; color: var(--lus-text-3); flex-shrink: 0; min-width: 38px; text-align: right; }
.lus-upload-item.done .lus-upload-status { color: var(--lus-success); }
.lus-upload-item.error .lus-upload-status { color: var(--lus-danger); }
.lus-upload-del {
    width: 22px; height: 22px; border: none; background: transparent; border-radius: 4px;
    cursor: pointer; color: var(--lus-text-3); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.lus-upload-del:hover { background: var(--lus-danger-soft); color: var(--lus-danger); }
.lus-upload-del .lus-ic { width: 12px; height: 12px; }
.lus-upload--drag { outline: 2px dashed var(--lus-teal); outline-offset: -2px; }

/* ================= v2.0 增强：Date 时间/底部操作 ================= */
.lus-date-time { display: flex; align-items: center; gap: 4px; padding: 8px 2px 0; font-size: 13px; color: var(--lus-text-1); }
.lus-date-time-label { font-size: 12px; color: var(--lus-text-3); margin-right: 2px; }
.lus-date-time input {
    width: 46px; height: 28px; border: 1px solid var(--lus-border); border-radius: 6px;
    text-align: center; font-size: 13px; outline: none; font-family: inherit; box-sizing: border-box;
}
.lus-date-time input:focus { border-color: var(--lus-teal); box-shadow: 0 0 0 2px var(--lus-teal-soft); }
.lus-date-foot { display: flex; justify-content: flex-end; gap: 6px; padding: 8px 2px 2px; border-top: 1px solid var(--lus-bg-soft); margin-top: 8px; }
.lus-date-clear, .lus-date-ok { height: 28px; padding: 0 12px; border-radius: 6px; font-size: 12.5px; cursor: pointer; font-family: inherit; }
.lus-date-clear { border: 1px solid var(--lus-border); background: #fff; color: var(--lus-text-2); }
.lus-date-clear:hover { border-color: var(--lus-teal); color: var(--lus-teal); }
.lus-date-ok { border: 1px solid var(--lus-teal); background: var(--lus-teal); color: #fff; }
.lus-date-ok:hover { background: var(--lus-teal-dark); }
.lus-date-grid .lus-date-day.hover { background: var(--lus-bg-hover); color: var(--lus-teal); box-shadow: inset 0 0 0 1px var(--lus-teal); }
.lus-date-grid .lus-date-day.in-range { background: var(--lus-teal-soft); border-radius: 0; }

/* ================= v2.0 增强：下拉高亮 hover 类（键盘导航） ================= */
.lus-cselect-opt.hover { background: var(--lus-bg-hover); color: var(--lus-teal); }
.lus-ms-item.hover { background: var(--lus-bg-hover); }

/* ================= v2.0 增强：暗色主题（data-lus-theme="dark"） ================= */
[data-lus-theme="dark"] {
    --lus-teal: #2dd4bf;
    --lus-teal-dark: #14b8a6;
    --lus-teal-light: #5eead4;
    --lus-teal-soft: rgba(45, 212, 191, 0.12);
    --lus-danger: #f87171;
    --lus-danger-soft: rgba(248, 113, 113, 0.14);
    --lus-success: #34d399;
    --lus-success-soft: rgba(52, 211, 153, 0.14);
    --lus-warning: #fbbf24;
    --lus-warning-soft: rgba(251, 191, 36, 0.14);
    --lus-border: #33384a;
    --lus-border-card: #2c3040;
    --lus-text-1: #e8eaf0;
    --lus-text-2: #a3a9b8;
    --lus-text-3: #6b7280;
    --lus-bg-page: #171a24;
    --lus-bg-hover: #22283a;
    --lus-bg-soft: #1e2230;
    --lus-card-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    --lus-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --lus-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
    --lus-shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
}
[data-lus-theme="dark"] .lus-btn,
[data-lus-theme="dark"] .lus-input,
[data-lus-theme="dark"] .lus-textarea,
[data-lus-theme="dark"] .lus-select,
[data-lus-theme="dark"] .lus-card,
[data-lus-theme="dark"] .lus-toast,
[data-lus-theme="dark"] .lus-dialog,
[data-lus-theme="dark"] .lus-modal,
[data-lus-theme="dark"] .lus-cselect-trigger,
[data-lus-theme="dark"] .lus-cselect-pop,
[data-lus-theme="dark"] .lus-ms-trigger,
[data-lus-theme="dark"] .lus-ms-pop,
[data-lus-theme="dark"] .lus-ms-search,
[data-lus-theme="dark"] .lus-date-panel,
[data-lus-theme="dark"] .lus-pager-btn,
[data-lus-theme="dark"] .lus-pager-size,
[data-lus-theme="dark"] .lus-pager-jump input,
[data-lus-theme="dark"] .lus-dropdown,
[data-lus-theme="dark"] .lus-col-setting,
[data-lus-theme="dark"] .lus-upload-item,
[data-lus-theme="dark"] .lus-grid th,
[data-lus-theme="dark"] .lus-grid td,
[data-lus-theme="dark"] .lus-date-clear {
    background: #1a1e2b;
    border-color: var(--lus-border);
    color: var(--lus-text-1);
}
[data-lus-theme="dark"] .lus-btn--primary,
[data-lus-theme="dark"] .lus-btn--danger-solid { background: var(--lus-teal); border-color: var(--lus-teal); color: #06281f; }
[data-lus-theme="dark"] .lus-btn--primary:hover { background: var(--lus-teal-dark); }
[data-lus-theme="dark"] .lus-btn:hover { background: #22283a; color: var(--lus-teal); }
[data-lus-theme="dark"] .lus-grid th.lus-grid-fixed-right,
[data-lus-theme="dark"] .lus-grid th.lus-grid-fixed-left { background: var(--lus-bg-soft); }
[data-lus-theme="dark"] .lus-grid td.lus-grid-fixed-right,
[data-lus-theme="dark"] .lus-grid td.lus-grid-fixed-left { background: #1a1e2b; }
[data-lus-theme="dark"] .lus-grid tbody tr:hover td.lus-grid-fixed-right,
[data-lus-theme="dark"] .lus-grid tbody tr:hover td.lus-grid-fixed-left { background: var(--lus-bg-hover); }
[data-lus-theme="dark"] .lus-pager-btn.active { background: var(--lus-teal); color: #06281f; }
[data-lus-theme="dark"] .lus-dialog-mask, [data-lus-theme="dark"] .lus-modal-mask { background: rgba(0, 0, 0, 0.6); }
[data-lus-theme="dark"] .lus-toast--success { background: var(--lus-success-soft); border-color: transparent; color: var(--lus-success); }
[data-lus-theme="dark"] .lus-toast--error { background: var(--lus-danger-soft); border-color: transparent; color: var(--lus-danger); }
[data-lus-theme="dark"] .lus-toast--warn { background: var(--lus-warning-soft); border-color: transparent; color: var(--lus-warning); }
[data-lus-theme="dark"] .lus-toast--info { background: rgba(37, 99, 235, 0.16); border-color: transparent; color: #93c5fd; }
[data-lus-theme="dark"] .lus-check .lus-check-box { background: #1a1e2b; border-color: var(--lus-border); }
[data-lus-theme="dark"] .lus-modal-close:hover { background: #2a3044; }
[data-lus-theme="dark"] .lus-ms-label { color: var(--lus-text-3); }
[data-lus-theme="dark"] .lus-ms-label.has { color: var(--lus-text-1); }
[data-lus-theme="dark"] .lus-date-year.active, [data-lus-theme="dark"] .lus-date-grid .lus-date-day.active { background: var(--lus-teal); color: #06281f; }
[data-lus-theme="dark"] .lus-date-ok { background: var(--lus-teal); color: #06281f; }
[data-lus-theme="dark"] .lus-grid-skeleton i { background: linear-gradient(90deg, #232839 25%, #2a3044 37%, #232839 63%); background-size: 400% 100%; }
[data-lus-theme="dark"] .lus-empty .lus-ic { color: #3a4156; }

/* ================= v2.0 增强：减弱动画偏好 ================= */
@media (prefers-reduced-motion: reduce) {
    .lus-toast, .lus-dialog, .lus-modal, .lus-dropdown, .lus-tip, .lus-date-panel,
    .lus-loading-spinner, .lus-grid-skeleton i, .lus-grid-updating .lus-grid-scroll::after,
    .lus-switch-track, .lus-switch-track::after {
        transition: none !important;
        animation: none !important;
    }
}

/* 打印隐藏 */
@media print {
    .lus-toast-wrap, .lus-dialog-mask, .lus-dialog, .lus-modal-mask, .lus-modal,
    .lus-loading-mask, .lus-drawer-mask, .lus-drawer { display: none !important; }
}
