/* ================================================================
   tenant.css — 租户端样式表（纯净底层框架）
   ================================================================
   [1]  CSS变量与主题色
   [2]  全局重置与字体
   [3]  主框架布局（Header/Side/Body/Footer/Tabs）
   [4]  页面内容区（page-container/content-card）
   [5]  弹窗公共骨架（in-modal-iframe基础重置）
   [6]  弹窗-普通表单（data-layout="form"）
   [8]  弹窗-复合表单（data-layout="complex"）
   [9]  输入框尺寸系统（input-sm/md/lg/xl/full）
   [10] 列表页样式（搜索栏/表格/分页）
   [11] 组件样式（按钮/标签/树/上传/多选）
   [12] 页面专属样式（登录/工作台/仪表盘）
   注：[7] 单据式布局（data-layout="bill"）为 ERP 业务样式，纯净版不迁入
   ================================================================ */

/* ================================================================
   [1] CSS变量与主题色
   ================================================================ */
:root {
    /* 主色 - 松石绿（Turquoise，清新自然、与白色侧栏对比明显、非蓝不刺眼） */
    --primary-color: #14917C;
    --primary-light: #3DB592;
    --primary-dark: #11745F;
    --primary-softer: rgba(20, 145, 124, 0.12);

    /* 侧栏 - 白色侧栏 + teal 激活（与全局主色统一，参考飞书白侧栏 + AntD 指示条） */
    --bg-side: #ffffff;
    --bg-side-hover: #f5f6fa;
    --bg-side-active: #14917C;      /* 折叠态激活实底：与全局主色一致 */
    --bg-side-active-soft: rgba(20, 145, 124, 0.10); /* 菜单激活浅 teal 底 */
    --text-side: #4a5568;
    --text-side-secondary: #6b7280;
    --side-border: #eef0f3;
    --side-shadow: rgba(15, 23, 42, 0.06);
    /* 菜单专用激活色（仅菜单栏使用；与全局按钮/分页 teal 同源） */
    --menu-accent: #14917C;
    --menu-accent-soft: rgba(20, 145, 124, 0.10);
    --menu-hover-bg: #f5f6fa;

    /* 多彩点缀（8色装饰，用于 stat-icon、标签、徽章等） */
    --accent-red:    #EF4444;
    --accent-orange: #F59E0B;
    --accent-green:  #10B981;
    --accent-blue:   #3B82F6;
    --accent-amber:  #EAB308;
    --accent-purple: #A855F7;
    --accent-cyan:   #06B6D4;
    --accent-pink:   #EC4899;

    /* 背景与边框 - 浅灰白系（对齐平台端 #EEF0F3，避免偏蓝冷调） */
    --border-light: #EEF0F3;
    --border-color: #CBD5E1;
    /* 页面底色：对齐参考 UI --bg-page #f5f6fa */
    --bg-content: #f5f6fa;
    --bg-card: #FFFFFF;
    --bg-soft: #F1F5F9;

    /* 文字 */
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;

    /* 危险色 */
    --danger: #EF4444;

    /* 尺寸 - 对齐参考UI：顶栏 52px、页脚 36px、折叠侧栏 60px */
    --header-height: 52px;
    --side-width: 200px;
    --side-collapsed-width: 60px;
    --footer-height: 36px;

    /* 覆盖 common.css 的青瓷色变量（租户端专用，整体改为松石绿系） */
    --celadon-50:  #E6F7F4;
    --celadon-100: #D1F0E9;
    --celadon-200: #A7E4D5;
    --celadon-300: #7DD8C0;
    --celadon-400: #3DB592;
    --celadon-500: #14917C;  /* 与 --primary-color 统一 */
    --celadon-600: #117A68;
    --celadon-700: #0E6456;
    --celadon-800: #0B4F44;
    --celadon-900: #083B33;
    --celadon-rgb: 20, 145, 124;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    height: 100%;
    /* 修复：页面级仅纵向滚动，横向滚动收敛到组件容器（如 .lus-grid-scroll），
       避免窗口缩小时内容超宽触发 html/body 横向滚动露出浅色背景（对齐平台端 overflow:hidden 行为） */
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--bg-content);
    /* 系统字体栈优先（无版权风险、渲染最快），开源可商用字体按需兜底 */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.lus-layout-body { overflow: hidden; }

.lus-layout-admin { width: 100%; height: 100%; }

.lus-layout-admin .lus-header {
    position: fixed;
    top: 0; left: var(--side-width); right: 0;
    height: var(--header-height);
    line-height: var(--header-height);
    background: #fff;
    border-bottom: 1px solid var(--border-light);
    box-shadow: none; /* 对齐平台端：仅用底部细线分隔，不带阴影 */
    z-index: 1000;
    /* 修复：头部从侧栏右侧开始，不再遮挡侧栏顶部的 LOGO 区域 */
}

body.side-spread .lus-layout-admin .lus-header {
    left: var(--side-collapsed-width);
}

.lus-layout-admin .lus-logo {
    position: fixed;
    top: 0; left: 0;
    width: var(--side-width);
    height: var(--header-height);
    line-height: var(--header-height);
    background: var(--bg-side);
    background-size: 100% 100vh;
    background-position: top center;
    background-repeat: no-repeat;
    color: var(--text-side);
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 0 16px;
    z-index: 1001;
    letter-spacing: 0.5px;
    border-bottom: none;
    border-right: none;
    /* 宽度动画由父级 .lus-side 驱动（本元素 width:100% 跟随），此处仅过渡背景，避免双层动画叠套导致收缩闪现 */
    transition: background-color 0.2s ease;
    overflow: hidden;
    white-space: nowrap;
    box-shadow: none;
    cursor: pointer;
}

/* logo 已移入侧栏顶部（对齐参考 UI .side-logo：52px + 底部边框） */
.lus-layout-admin .lus-side .lus-logo {
    position: relative;
    top: auto; left: auto;
    width: 100%;
    flex-shrink: 0;
    border-bottom: 1px solid var(--side-border);
    background: #fff;
}

.lus-layout-admin .lus-side .lus-logo:hover { background: var(--bg-side-hover); }

/* logo 图标：teal 圆角方块 + 白字（对齐参考UI logo-mark） */
.lus-layout-admin .lus-logo .lus-icon {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 7px;
    background: var(--menu-accent);
    color: #fff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: none;
    transition: background 0.2s ease;
}
/* 立方体图标本体尺寸：iconify 渲染为 <svg class="lus-ic">，需直接控制 SVG 才生效 */
.lus-layout-admin .lus-logo .lus-icon .lus-ic {
    width: 18px;
    height: 18px;
}

.lus-layout-admin .lus-logo .logo-text,
.lus-layout-admin .lus-logo .syslogo-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-side);
}

.lus-layout-admin .lus-logo span {
    transition: opacity 0.2s ease;
}

body.side-spread .lus-layout-admin .lus-logo {
    /* 不设 width：保持 width:100% 跟随侧栏父级 .lus-side 的过渡，Logo 与侧栏同宽平滑收缩 */
    justify-content: center;
    padding: 0;
    gap: 0;
}

body.side-spread .lus-layout-admin .lus-logo span {
    opacity: 0;
    width: 0;
    flex: 0 0 0;
    overflow: hidden;
}

.lus-layout-admin .lus-header .lus-nav:not(.lus-layout-right) {
    position: absolute;
    left: 0;
    right: 0; top: 0;
    height: var(--header-height);
    line-height: var(--header-height);
    background: transparent;
    padding: 0;
    transition: left 0.3s ease;
}

body.side-spread .lus-layout-admin .lus-header .lus-nav:not(.lus-layout-right) {
    left: 0;
}

.lus-layout-admin .lus-header .lus-nav.lus-layout-right {
    position: absolute;
    right: 0; left: auto; top: 0;
    height: var(--header-height);
    line-height: var(--header-height);
    background: transparent;
    padding: 0;
}

.lus-layout-admin .lus-header .lus-nav .lus-nav-item {
    line-height: var(--header-height);
    height: var(--header-height);
}

.lus-layout-admin .lus-header .lus-nav .lus-nav-item a {
    height: var(--header-height);
    line-height: var(--header-height);
    color: #4a5568;
    padding: 0 16px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.lus-layout-admin .lus-header .lus-nav .lus-nav-item a:hover {
    color: var(--primary-color);
    background: var(--primary-softer);
}
/* 顶栏导航图标：统一 16px（不被侧栏菜单图标规则影响） */
.lus-layout-admin .lus-header .lus-nav .lus-nav-item > a i.lus-icon {
    font-size: 16px;
}

.lus-layout-admin .lus-header .lus-nav .lus-nav-child {
    top: var(--header-height);
    border: 1px solid var(--border-light);
    box-shadow: 0 4px 12px rgba(0, 21, 41, 0.08);
    background: #fff;
    padding: 4px 0;
    border-radius: 4px;
}

.lus-layout-admin .lus-header .lus-nav .lus-nav-child dd { margin: 0; }

.lus-layout-admin .lus-header .lus-nav .lus-nav-child dd a {
    height: 38px;
    line-height: 38px;
    color: #4a5568;
    padding: 0 16px;
}

.lus-layout-admin .lus-header .lus-nav .lus-nav-child dd a:hover {
    background: var(--primary-softer);
    color: var(--primary-color);
}

.ls-user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--border-light, #E4E9ED);
    color: #9CA8B5;
    margin-right: 8px;
    vertical-align: middle;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.ls-tenant-info .lus-nav-item a {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 0 18px !important;
}

.ls-info-item {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    line-height: 1.3;
    font-size: 13px;
    color: #4a5568;
    vertical-align: middle;
}

.ls-info-item i {
    display: none;
}

.ls-info-item em {
    font-style: normal;
    font-size: 11px;
    color: #a0aec0;
    margin-bottom: 2px;
    font-weight: 400;
}

.ls-info-item:not(:last-child) {
    border-right: 1px solid var(--border-light);
    padding-right: 16px;
}

.ls-user-avatar img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}

.lus-layout-admin .lus-side {
    position: fixed;
    top: 0;
    left: 0; bottom: 0;
    width: var(--side-width);
    background: var(--bg-side) !important;
    background-size: 100% 100vh !important;
    background-position: top center !important;
    background-repeat: no-repeat !important;
    overflow: hidden;
    z-index: 999;
    border-right: 1px solid var(--side-border);
    box-shadow: none; /* 对齐平台端：仅用右边细线分隔，不带阴影 */
    transition: width 0.3s ease;
}

.lus-layout-admin .lus-side.lus-bg-black,
.lus-layout-admin .lus-side.lus-side-menu {
    background: var(--bg-side) !important;
    background-size: 100% 100vh !important;
    background-position: top center !important;
    background-repeat: no-repeat !important;
}

body.side-spread .lus-layout-admin .lus-side {
    width: var(--side-collapsed-width);
}

.lus-side-scroll {
    width: calc(var(--side-width) + 20px);
    height: calc(100% - var(--header-height));
    overflow-x: hidden;
    overflow-y: auto;
    /* 隐藏侧栏滚动条（Firefox + IE/Edge） */
    scrollbar-width: none;
    -ms-overflow-style: none;
    transition: width 0.3s ease;
}

body.side-spread .lus-side-scroll {
    width: calc(var(--side-collapsed-width) + 20px);
}

.lus-side-scroll::-webkit-scrollbar { width: 4px; }
.lus-side-scroll::-webkit-scrollbar-track { background: transparent; }
.lus-side-scroll::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.25);
    border-radius: 2px;
}
.lus-side-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.45);
}

.lus-nav-tree {
    width: var(--side-width);
    background: transparent !important;
    padding: 0 0 10px;
    transition: width 0.3s ease;
}

body.side-spread .lus-nav-tree {
    width: var(--side-collapsed-width);
}

.lus-nav-tree .lus-nav-item {
    background: transparent;
    margin: 2px 8px;
    position: relative;
    border-radius: 8px;
}
/* 首项贴 logo 底部，使菜单图标与选项卡图标中心对齐（对齐参考 UI） */
.lus-nav-tree .lus-nav-item:first-child { margin-top: 0; }

.lus-nav-tree .lus-nav-item a {
    height: 40px;
    line-height: 40px;
    padding: 0 12px;
    color: var(--text-side) !important;
    background: transparent !important;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    font-size: 14px;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    border-radius: 0;
    margin: 0;
    /* flex 布局：让图标、文字、箭头水平并排垂直居中 */
    display: flex;
    align-items: center;
    gap: 10px;
}
/* 一级菜单箭头：对齐参考 UI .menu-link .arrow（CSS 画小箭头，展开旋转；仅存在二级菜单的一级菜单显示） */
.lus-nav-tree .lus-nav-item > a::after {
    content: "";
    margin-left: auto;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid #a0aec0;
    border-bottom: 1.5px solid #a0aec0;
    transform: rotate(-45deg);
    transition: transform 0.2s ease, border-color 0.2s ease;
    flex-shrink: 0;
    display: none;
}
.lus-nav-tree .lus-nav-item.has-sub > a::after {
    display: block;
}
.lus-nav-tree .lus-nav-item.has-sub.lus-nav-itemed > a::after {
    transform: rotate(45deg);
    border-color: var(--menu-accent);
}
body.side-spread .lus-nav-tree .lus-nav-item > a::after { display: none; }

.lus-nav-tree .lus-nav-item a i {
    width: 20px;
    text-align: center;
    margin-right: 10px;
    flex-shrink: 0;
    font-size: 18px;
}
/* 图标 iconify 后实际渲染为 <svg class="lus-ic">，尺寸需直接作用于 SVG 才可控 */
.lus-nav-tree .lus-nav-item a .lus-ic {
    width: 18px;
    height: 18px;
}

.lus-nav-tree .lus-nav-item a span {
    font-size: 14px;
    transition: opacity 0.2s ease;
}

body.side-spread .lus-nav-tree .lus-nav-item {
    margin: 2px 0;
}

body.side-spread .lus-nav-tree .lus-nav-item a {
    padding: 0;
    text-align: center;
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.side-spread .lus-nav-tree .lus-nav-item a i {
    margin-right: 0;
    font-size: 22px;
}
body.side-spread .lus-nav-tree .lus-nav-item a .lus-ic {
    width: 22px;
    height: 22px;
}
body.side-spread .lus-nav-tree .lus-nav-item a span {
    opacity: 0;
    width: 0;
    display: none;
}

body.side-spread .lus-nav-tree .lus-nav-item.lus-nav-itemed > a,
body.side-spread .lus-nav-tree .lus-nav-item.lus-this > a {
    background: transparent !important;
    color: var(--menu-accent) !important;
    border-radius: 8px;
}

body.side-spread .lus-nav-tree .lus-nav-item .lus-nav-more {
    display: none !important;
}

body.side-spread .lus-nav-tree .lus-nav-item .lus-nav-child {
    display: none !important;
}

.side-float-menu {
    position: fixed;
    left: var(--side-collapsed-width);
    width: 180px;
    background: #fff;
    border: 1px solid #e5e8ef;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.16);
    padding: 6px;
    z-index: 1001;
    border-radius: 8px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

.side-float-menu dd {
    margin: 0;
    display: block;
    width: 100%;
}

.side-float-menu dd a {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 10px;
    border-radius: 6px;
    color: #374151;
    font-size: 13px;
    line-height: 1.5;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.15s ease;
}

.side-float-menu dd a:hover {
    color: var(--menu-accent);
    background: var(--menu-hover-bg);
}

.side-float-menu dd a.lus-this {
    background: var(--menu-accent-soft);
    color: var(--menu-accent);
    font-weight: 500;
}

/* ===== 到期/宽限期提示横幅 ===== */
.ls-expire-banner{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:8px 16px;
    font-size:13px;
    line-height:1.5;
    border-bottom:1px solid rgba(0,0,0,.06);
}
.ls-expire-banner .ls-expire-content{
    display:flex;
    align-items:center;
    gap:8px;
    flex:1;
    min-width:0;
}
.ls-expire-banner .ls-expire-content .lus-icon{
    font-size:18px;
    flex-shrink:0;
}
.ls-expire-banner .ls-expire-text{
    flex:1;
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.ls-expire-banner .ls-expire-actions{
    display:flex;
    align-items:center;
    gap:8px;
    flex-shrink:0;
    margin-left:12px;
}
.ls-expire-banner .ls-expire-btn{
    padding:3px 12px;
    border-radius:3px;
    background:#fff;
    color:#374151;
    font-weight:500;
    text-decoration:none;
    border:1px solid rgba(0,0,0,.15);
    transition:all .2s;
}
.ls-expire-banner .ls-expire-btn:hover{
    background:rgba(255,255,255,.85);
    border-color:rgba(0,0,0,.25);
}
.ls-expire-banner .ls-expire-close{
    color:rgba(255,255,255,.85);
    font-size:14px;
    padding:2px 4px;
    cursor:pointer;
    text-decoration:none;
}
.ls-expire-banner .ls-expire-close:hover{ color:#fff; }

/* 将到期（黄色提示） */
.ls-expire-expiring{
    background:#fff7e6;
    color:#92400e;
}
.ls-expire-expiring .ls-expire-btn{ background:#92400e; color:#fff; border-color:#92400e; }
.ls-expire-expiring .ls-expire-btn:hover{ background:#78350f; border-color:#78350f; }
.ls-expire-expiring .ls-expire-close{ color:#92400e; }
.ls-expire-expiring .ls-expire-close:hover{ color:#78350f; }

/* 宽限期中（橙色，更紧急） */
.ls-expire-grace{
    background:#fef3c7;
    color:#7c2d12;
}
.ls-expire-grace .ls-expire-btn{ background:#7c2d12; color:#fff; border-color:#7c2d12; }
.ls-expire-grace .ls-expire-btn:hover{ background:#581c0e; border-color:#581c0e; }
.ls-expire-grace .ls-expire-close{ color:#7c2d12; }
.ls-expire-grace .ls-expire-close:hover{ color:#581c0e; }

/* 已过期（红色警告） */
.ls-expire-expired{
    background:#fee2e2;
    color:#991b1b;
}
.ls-expire-expired .ls-expire-btn{ background:#991b1b; color:#fff; border-color:#991b1b; }
.ls-expire-expired .ls-expire-btn:hover{ background:#7f1d1d; border-color:#7f1d1d; }
.ls-expire-expired .ls-expire-close{ color:#991b1b; }

/* 已停用 / 待清理 / 已清理（灰色） */
.ls-expire-disabled,
.ls-expire-pending_clean,
.ls-expire-cleaned{
    background:#f3f4f6;
    color:#4b5563;
}
.ls-expire-disabled .ls-expire-btn,
.ls-expire-pending_clean .ls-expire-btn,
.ls-expire-cleaned .ls-expire-btn{ background:#4b5563; color:#fff; border-color:#4b5563; }
.ls-expire-disabled .ls-expire-close,
.ls-expire-pending_clean .ls-expire-close,
.ls-expire-cleaned .ls-expire-close{ color:#4b5563; }

.lus-nav-tree .lus-nav-item > a {
    position: relative;
    z-index: 0;
}
/* 一级菜单：hover/active 用 28px 矮圆角条（对齐参考UI，沉底避免遮挡文字） */
.lus-nav-tree .lus-nav-item > a::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-nav-tree .lus-nav-item > a:hover::before {
    background: var(--menu-hover-bg);
}

.lus-nav-tree .lus-nav-item a:hover {
    color: var(--menu-accent) !important;
    background: transparent !important;
    border-left-color: transparent;
}

/* 一级展开态：保持底色不变（对齐参考UI，展开时 menu-link 不整行变色） */
.lus-nav-tree .lus-nav-item.lus-nav-itemed > a {
    background: transparent !important;
    color: var(--text-side) !important;
    border-left-color: transparent;
    border-radius: 8px;
    margin: 0;
    box-shadow: none;
}

/* 一级激活：矮圆角条 teal-soft 底 + teal 字，无左侧竖线 */
.lus-nav-tree .lus-nav-item.lus-this > a,
.lus-nav-tree .lus-nav-item.ls-menu-active > a {
    background: transparent !important;
    color: var(--menu-accent) !important;
    font-weight: 500;
    border-radius: 8px;
    margin: 0;
    box-shadow: none;
    border-left-color: transparent;
}
.lus-nav-tree .lus-nav-item.lus-this > a::before,
.lus-nav-tree .lus-nav-item.ls-menu-active > a::before {
    background: var(--menu-accent-soft);
}
/* 折叠态：不显示一级矮圆角条（避免左侧跳来跳去），只让图标变色 */
body.side-spread .lus-nav-tree .lus-nav-item > a::before {
    display: none;
}

.lus-nav-tree .lus-nav-child {
    background: transparent !important;
    padding: 4px 0;
}

.lus-nav-tree .lus-nav-child dd { margin: 1px 0; }

.lus-nav-tree .lus-nav-child dd a {
    height: 36px;
    line-height: 36px;
    /* 二级缩进：sdot 圆点在一级图标右侧错落，对齐参考 UI 层级 */
    padding: 0 12px 0 28px;
    color: var(--text-side-secondary) !important;
    background: transparent !important;
    font-size: 13px;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 0;
}
/* 二级菜单：hover/active 用 26px 矮圆角条（对齐参考UI），激活保留左侧竖线 */
.lus-nav-tree .lus-nav-child dd a::after {
    content: "";
    position: absolute;
    left: 0; right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 26px;
    border-radius: 8px;
    background: transparent;
    transition: background 0.15s;
    z-index: -1;
}
.lus-nav-tree .lus-nav-child dd a:hover {
    color: var(--menu-accent) !important;
    background: transparent !important;
    border-left-color: transparent;
}
.lus-nav-tree .lus-nav-child dd a:hover::after {
    background: var(--menu-hover-bg);
}

/* 二级菜单 sdot 圆点（对齐参考UI sub-link .sdot：5px 圆点，hover/激活变 teal） */
.lus-nav-tree .lus-nav-child dd a > .ls-sdot,
.side-float-menu dd a > .ls-sdot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #d1d5db;
    flex-shrink: 0;
}
.lus-nav-tree .lus-nav-child dd a:hover > .ls-sdot,
.lus-nav-tree .lus-nav-child dd.lus-this > a > .ls-sdot,
.side-float-menu dd a:hover > .ls-sdot {
    background: var(--menu-accent);
}

.lus-nav-tree .lus-nav-child dd.lus-this a,
.lus-nav-tree .lus-nav-child dd.ls-menu-active > a {
    background: transparent !important;
    color: var(--menu-accent) !important;
    font-weight: 500;
    border-radius: 8px;
    margin: 0;
    box-shadow: none;
    border-left-color: transparent;
}
.lus-nav-tree .lus-nav-child dd.lus-this a::after,
.lus-nav-tree .lus-nav-child dd.ls-menu-active > a::after {
    background: var(--menu-accent-soft);
}
/* 激活竖条：对齐参考UI sub-link.active::before —— 作为链接内第一个子项（静态 flex），紧贴圆点前面，非整行绝对定位 */
.lus-nav-tree .lus-nav-child dd.lus-this > a::before,
.lus-nav-tree .lus-nav-child dd.ls-menu-active > a::before {
    content: "";
    width: 3px;
    height: 14px;
    border-radius: 2px;
    background: var(--menu-accent);
    flex-shrink: 0;
}
/* 清除 liusu 原生给激活 dd 加的实底色（树形菜单整行变绿），激活底色由 a 的浅 teal 承载 */
.lus-nav-tree .lus-nav-child dd.lus-this,
.lus-nav-tree .lus-nav-child dd.ls-menu-active {
    background: transparent !important;
}

.lus-nav-tree .lus-nav-bar { display: none; }

/* ===== 三级菜单样式 ===== */
/* has-sub 是分类标题（如"库存报表"），liusu element 会误加 lus-this，
   这里强制 neutralize，不让分类标题被高亮，避免"下面所有菜单底色都变了" */
.lus-nav-tree .lus-nav-child dd.has-sub.lus-this > a,
.lus-nav-tree .lus-nav-child dd.has-sub > a {
    background: transparent !important;
    color: var(--text-side) !important;
    border-left-color: transparent !important;
    font-weight: 500;
    font-size: 13px; /* 显式锁定分类标题字号，与二级一致（避免继承漂移） */
    transition: none !important;
    /* flex 布局：让图标、文字、箭头水平并排垂直居中 */
    display: flex;
    align-items: center;
    position: relative;
    z-index: 0;
}
/* 分类标题 hover：矮圆角条（对齐参考UI sub-link 交互） */
.lus-nav-tree .lus-nav-child dd.has-sub > a::after {
    content: "";
    position: absolute;
    left: 0; right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 26px;
    border-radius: 8px;
    background: transparent;
    transition: background 0.15s;
    z-index: -1;
}
.lus-nav-tree .lus-nav-child dd.has-sub > a:hover::after {
    background: var(--menu-hover-bg);
}
/* 二级菜单 has-sub 的子箭头：在文字和右边缘中间 */
.lus-nav-tree .lus-nav-child dd.has-sub > a .sub-arrow {
    font-size: 12px;
    opacity: 0.7;
    margin-left: auto;
    margin-right: auto;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
/* 关键覆盖：外部 UI 框架样式 用后代选择器 dd.lus-this a 会导致 has-sub 下的
   三级菜单 a 全部被高亮，这里强制还原三级菜单项的样式 */
.lus-nav-tree .lus-nav-child dd.has-sub.lus-this .sub-nav dd a,
.lus-nav-tree .lus-nav-child dd.has-sub.lus-this .sub-nav dd a > .lus-icon {
    background: transparent !important;
    color: var(--text-side-secondary) !important;
    border-left-color: transparent !important;
}
.lus-nav-tree .lus-nav-child dd.has-sub.lus-this .sub-nav dd a:hover {
    color: var(--menu-accent) !important;
    background: transparent !important;
}
/* has-sub 分类标题展开时箭头旋转 */
.lus-nav-tree .lus-nav-child dd.has-sub.sub-open > a .sub-arrow {
    transform: rotate(90deg);
    opacity: 1;
}
/* 三级子菜单 dl（默认隐藏，sub-open 时显示） */
.lus-nav-tree .lus-nav-child dd.has-sub > .sub-nav {
    display: none;
    padding: 2px 0 2px 0;
}
.lus-nav-tree .lus-nav-child dd.has-sub.sub-open > .sub-nav {
    display: block;
}
/* 三级菜单项缩进 */
.lus-nav-tree .lus-nav-child dd.has-sub .sub-nav dd a {
    padding-left: 52px;
    padding-right: 16px; /* 修复：三级菜单文字贴右被挡，加右边距 */
    font-size: 12.5px;
    height: 34px;
    line-height: 34px;
    opacity: 0.85;
    transition: color 0.2s ease, border-color 0.2s ease;
    /* 修复：长菜单名（如"供应商应付汇总"）溢出优雅截断显示省略号 */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lus-nav-tree .lus-nav-child dd.has-sub .sub-nav dd a > .lus-icon {
    margin-left: -18px;
    font-size: 12px;
}
.lus-nav-tree .lus-nav-child dd.has-sub .sub-nav dd a > .lus-ic {
    width: 12px;
    height: 12px;
}
.lus-nav-tree .lus-nav-child dd.has-sub .sub-nav dd a:hover {
    color: var(--menu-accent) !important;
    background: transparent !important;
}
.lus-nav-tree .lus-nav-child dd.has-sub .sub-nav dd.lus-this a,
.lus-nav-tree .lus-nav-child dd.has-sub .sub-nav dd.ls-menu-active > a {
    background: transparent !important;
    color: var(--menu-accent) !important;
    font-weight: 600;
    border-radius: 8px;
    margin: 0;
    box-shadow: none;
}
/* 浮动菜单中的三级展开（始终显示） */
.side-float-menu .has-sub > a {
    font-weight: 500;
    color: #1f2937;
    cursor: default;
}
.side-float-menu .has-sub > a .sub-arrow {
    display: none;
}
.side-float-menu .sub-nav {
    display: block !important;
    padding-left: 12px;
}
.side-float-menu .sub-nav dd a {
    padding-left: 28px;
    font-size: 13px;
    color: #6b7280;
}

.lus-layout-admin .lus-body {
    position: fixed;
    top: var(--header-height);
    left: var(--side-width);
    right: 0; bottom: var(--footer-height);
    padding-bottom: 0 !important;
    background: var(--bg-content);
    overflow: hidden;
    z-index: 998;
    transition: left 0.3s ease;
}

body.side-spread .lus-layout-admin .lus-body {
    left: var(--side-collapsed-width);
}

.lus-layout-admin .lus-footer {
    position: fixed;
    bottom: 0;
    left: var(--side-width);
    right: 0;
    height: var(--footer-height);
    line-height: var(--footer-height);
    background: #fff;
    border-top: 1px solid var(--border-light);
    text-align: center;
    color: #a0aec0;
    font-size: 12px;
    z-index: 1002;
    transition: left 0.3s ease;
}

body.side-spread .lus-layout-admin .lus-footer {
    left: var(--side-collapsed-width);
}

.admin-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.ls-tabs-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--bg-content);
}

.ls-tabs-header {
    display: flex;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid var(--border-light);
    height: 40px;
    padding: 0 8px;
    gap: 2px;
    flex-shrink: 0;
}

.ls-tabs-scroll {
    flex: 1;
    overflow: hidden;
    overflow-x: auto;
    padding: 0 4px;
}

.ls-tabs-scroll::-webkit-scrollbar { height: 0; display: none; }

.ls-tabs-list {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    height: 40px;
}

.ls-tab {
    height: 30px;
    line-height: 30px;
    font-size: 13px;
    padding: 0 6px 0 10px;
    margin: 0 5px 0 0;
    border-radius: 6px;
    color: var(--text-side-secondary);
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    border-bottom: none;
}

.ls-tab:hover {
    color: var(--menu-accent);
    background: #f5f6fa;
}

.ls-tab.active {
    background: var(--menu-accent-soft);
    border-bottom-color: transparent;
    color: var(--menu-accent);
    font-weight: 500;
}

.ls-tab-icon {
    font-size: 13px;
    margin-right: 6px;
}

.ls-tab-title {
    display: inline-block;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ls-tab-close {
    margin-left: 6px;
    font-size: 12px;
    border-radius: 4px;
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    transition: all 0.15s ease;
    opacity: 0;
}

.ls-tab:hover .ls-tab-close {
    opacity: 1;
}

.ls-tab-close:hover {
    background: rgba(0, 0, 0, 0.12);
    color: var(--text-primary);
    opacity: 1;
}

/* 选项卡操作区（对齐参考 UI .tabs-actions：左边细线分隔） */
.ls-tabs-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-left: 8px;
    border-left: 1px solid var(--border-light);
    margin-left: 4px;
    flex-shrink: 0;
    height: 100%;
}

.ls-tab-btn {
    position: relative;
    width: 26px;
    height: 26px;
    line-height: 26px;
    text-align: center;
    cursor: pointer;
    color: var(--text-side-secondary);
    border-radius: 6px;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.ls-tab-btn:hover {
    background: var(--primary-softer);
    color: var(--primary-color);
}

.ls-tab-btn .lus-icon { font-size: 14px; }

/* 快速提示（data-tip）：悬停约 150ms 即显示，替代系统 title 的长延迟 */
[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1f2329;
    color: #fff;
    font-size: 12px;
    line-height: 1;
    padding: 5px 9px;
    border-radius: 5px;
    white-space: nowrap;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity .12s ease .18s, visibility 0s linear .18s;
}
[data-tip]:hover::after {
    opacity: 1;
    visibility: visible;
    transition: opacity .1s ease .15s, visibility 0s linear 0s;
}

.ls-tab-dropdown .ls-tab-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 2px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 4px 0;
    z-index: 1001;
    min-width: 120px;
    display: none;
    margin-top: 0;
}

.ls-tab-dropdown:hover .ls-tab-menu { display: block; }

.ls-tab-dropdown::after {
    content: '';
    position: absolute;
    top: 100%; left: 0; right: 0;
    height: 8px;
    background: transparent;
}

.ls-tab-menu dd { padding: 0; margin: 0; }

.ls-tab-menu dd a {
    display: block;
    padding: 8px 16px;
    color: #4a5568;
    font-size: 13px;
    line-height: 1.5;
    transition: all 0.2s ease;
    text-decoration: none;
}

.ls-tab-menu dd a:hover {
    background: var(--primary-softer);
    color: var(--primary-color);
}

.ls-tabs-content {
    flex: 1;
    padding: 0;
    background: var(--bg-content);
    overflow: hidden;
    position: relative;
}

.ls-tab-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: none;
    position: absolute;
    top: 0; left: 0;
    background: var(--bg-content);
}
/* 内容切换平滑过渡：新页面加载完成前旧页面保持显示（ls-leaving），
   新页面就绪后淡入并从右侧轻微滑入（与抽屉滑入同方向，消除"内容瞬间刷出/从左出现"的突兀感）；
   加载期透明+右偏，就绪后移除 ls-loading 触发 transition；ls-leaving 同步淡出避免旧页面"从左露出" */
.ls-tab-iframe { transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.3, 1.25, 0.55, 1); }
.ls-tab-iframe.ls-loading { opacity: 0; transform: translateX(24px); }
.ls-tab-iframe.ls-leaving { opacity: 0; z-index: 1; transition: opacity 0.2s ease; }
.ls-tab-iframe.ls-incoming { z-index: 2; }

.ls-tab-iframe.active {
    display: block;
}

/* ============================================================
   页面内容区：铺满 iframe 宽度，支持滚动
   ============================================================ */
.page-container {
    width: 100%;
    margin: 0;
    padding: 3px; /* 对齐列表页：内容距容器四周 3px（用户要求） */
    min-height: 100%;
    overflow-y: auto;
}
/* 页面底部最后一张卡片去掉默认下边距，保证与容器底部恰好 3px */
.page-container > .content-card:last-child {
    margin-bottom: 0;
}
/* 工作台：内容距离边框固定 6px（不受窄屏媒体查询压缩影响） */
.page-container.workbench-page {
    padding: 6px;
    display: flex;
    flex-direction: column;
}
/* 工作台大卡片：统包全部内容，四周距容器 6px（workbench-page padding），内容不足一屏时撑满 */
.workbench-card {
    flex: 1 1 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    padding: 20px 20px 12px; /* 底部 12px：最后一张卡片距大卡片底边不要太远 */
    min-width: 0;
}
/* 工作台：模块间距统一 12px（对齐 liusucaiwu 财务工作台节奏）；
   最后一张卡（最近销售订单）与容器底部 0 间距 → 容器 padding 6px 即距页脚 6px */
.workbench-page .dashboard-grid {
    margin-bottom: 12px;
}
.workbench-page .dashboard-grid:last-child {
    margin-bottom: 0;
}
.workbench-page .dashboard-grid:last-child .content-card {
    margin-bottom: 0;
}
/* 工作台：模块间距统一 12px（与欢迎卡片→常用业务的间距一致，用户要求） */
.workbench-page > .content-card {
    margin-bottom: 12px;
}
.workbench-page .dashboard-grid.lg {
    gap: 12px;
}
/* 标题栏已废弃 — 菜单名在左侧已显示，无需重复 */
.page-header { display: none; }
.page-title { display: none; }

/* ============================================================
   弹窗 iframe 内 — 租户端独有扩展
   （基础重置已迁移到 common.css，这里保留兼容旧版 lus-form-item 表单）
   ============================================================ */
/* 兼容租户端旧版 lus-form-item 弹窗表单 */
.in-modal-iframe .lus-form-item, .in-modal-inline .lus-form-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
    min-height: 32px;   /* 最小高度 */
    align-self: start;  /* grid item 不被拉伸（防止同行 stretch 时 box 被拉高 8px 导致错位） */
    overflow: visible;
}
/* 弹窗内 input/select/cselect 一律 32px（覆盖 common.css .input-md 的 38px，
   保证 grid 两列布局时同一行两 form-item 的 box 高度一致，input 与 label 完美对齐） */
.in-modal-iframe .lus-input, .in-modal-inline .lus-input,
.in-modal-iframe select.lus-input, .in-modal-inline select.lus-input { height: 32px !important; box-sizing: border-box; }
.in-modal-iframe .lus-cselect .lus-cselect-trigger,
.in-modal-inline .lus-cselect .lus-cselect-trigger,
.in-modal-iframe .lus-ms .lus-ms-trigger,
.in-modal-inline .lus-ms .lus-ms-trigger { height: 32px !important; box-sizing: border-box; }
/* grid 两列布局：行间距用 grid gap（不用 form-item margin，避免 margin 参与 track 撑高同行 box） */
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px 24px; justify-content: start; align-items: start; }
.info-grid > .lus-form-item { margin-bottom: 0; }
.in-modal-iframe .lus-form-label, .in-modal-inline .lus-form-label {
    flex: 0 0 auto;
    width: 100px;
    padding-right: 12px;
    text-align: right;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 32px;
    height: 32px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.in-modal-iframe .lus-input-block, .in-modal-inline .lus-input-block {
    flex: 0 0 240px;
    width: 240px;
    margin-left: 0;
    min-height: auto;
}
.in-modal-iframe .lus-input-block .lus-input,
.in-modal-inline .lus-input-block .lus-input,
.in-modal-iframe .lus-input-block select,
.in-modal-inline .lus-input-block select,
.in-modal-iframe .lus-input-block .lus-cselect,
.in-modal-inline .lus-input-block .lus-cselect,
.in-modal-iframe .lus-input-block .lus-cselect .lus-input, .in-modal-inline .lus-input-block .lus-cselect .lus-input {
    width: 100%;
}
.in-modal-iframe .lus-form-item .lus-input,
.in-modal-inline .lus-form-item .lus-input,
.in-modal-iframe .lus-form-item select, .in-modal-inline .lus-form-item select {
    height: 32px;
    padding: 0 11px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
}
.in-modal-iframe .lus-form-item .lus-input:focus,
.in-modal-inline .lus-form-item .lus-input:focus,
.in-modal-iframe .lus-form-item select:focus, .in-modal-inline .lus-form-item select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-softer);
    outline: none;
}
.in-modal-iframe .lus-form-item .lus-form-mid, .in-modal-inline .lus-form-item .lus-form-mid {
    line-height: 32px;
    padding: 0 0 0 10px;
}
.in-modal-iframe .lus-form-item .lus-btn + .lus-btn, .in-modal-inline .lus-form-item .lus-btn + .lus-btn {
    margin-left: 8px;
}
.in-modal-iframe .lus-form-item:last-child, .in-modal-inline .lus-form-item:last-child {
    margin-bottom: 0;
    margin-top: 8px;
}

/* ============================================================
   业务色系 — 松石绿（主操作色，与全局主色统一）
   多彩点缀通过 stat-icon 的 8 色装饰体现，主操作元素统一用松石绿
   ============================================================ */
:root {
    --business-color: #C53030;
    --business-hover: #A91F1F;
    --business-light: #FDECEC;
    --business-softer: rgba(197, 48, 48, 0.12);
}

/* 等宽字体 */
code, pre, .ls-mono {
    font-family: 'JetBrainsMono', "Courier New", monospace;
}

/* 按钮体系 — 松石绿（白字保证对比度） */
.lus-layout-admin .lus-btn:not(.lus-btn-primary):not(.lus-btn-danger):not(.lus-btn-warm):not(.btn-gray):not(.btn-blue):not(.btn-orange) {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #FFFFFF;
}
.lus-layout-admin .lus-btn:not(.lus-btn-primary):not(.lus-btn-danger):not(.lus-btn-warm):not(.btn-gray):not(.btn-blue):not(.btn-orange):hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #FFFFFF;
    opacity: 0.95;
}
.lus-layout-admin .lus-btn-primary {
    background-color: #fff;
    border-color: var(--border-light);
    color: var(--text-secondary);
}
.lus-layout-admin .lus-btn-primary:hover {
    background-color: #F3F4F6;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 表单聚焦 — 松石绿 */
.lus-layout-admin .lus-input:focus,
.lus-layout-admin .lus-textarea:focus,
.lus-layout-admin input:focus,
.lus-layout-admin select:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px var(--primary-softer) !important;
    outline: none;
}

/* 分页当前页 — 松石绿 */
.lus-table-page .lus-laypage .lus-laypage-curr .lus-laypage-em {
    background-color: var(--primary-color) !important;
    border-radius: 6px;
}

/* 表格内按钮 — 松石绿 */
.lus-table .lus-btn:not(.btn-gray):not(.btn-blue):not(.btn-orange):not(.lus-btn-danger):not(.lus-btn-warm):not(.lus-btn-primary) {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
.lus-table .lus-btn:not(.btn-gray):not(.btn-blue):not(.btn-orange):not(.lus-btn-danger):not(.lus-btn-warm):not(.lus-btn-primary):hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* 卡片标题 — 松石绿 */
.content-card .card-title,
.ls-table-header h3 {
    color: var(--primary-dark) !important;
}

/* 链接色 */
.lus-layout-admin a {
    color: var(--primary-color);
}
.lus-layout-admin a:hover {
    color: var(--primary-dark);
}

/* ============================================================
   以下 UI 组件样式由 common.css 拆分迁入（租户端独立维护）
   ============================================================ */

/* === 模态对话框（lus.modal 结构） === */
.lus-modal {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0,0,0,0.10);
    background: #fff;
    /* 用 flex 纵向布局，确保 body 自动占满剩余空间 */
    display: flex;
    flex-direction: column;
    /* 全局约束：防止低分辨率下弹窗超出可视区域、内容被遮挡 */
    max-width: 100vw !important;
    max-height: 100vh !important;
}
.lus-modal .lus-modal-head {
    flex: 0 0 auto;
    border-radius: 10px 10px 0 0;
    background: var(--bg-soft, #F7F8FA);
}
.lus-modal .lus-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 0;
    background: #fff;
    border-radius: 0;
}
.lus-modal .lus-modal-foot {
    text-align: right;
    padding: 10px 16px;
    background: var(--bg-soft, #f7fafc);
    border-top: 1px solid var(--border-light, #e2e8f0);
}
.lus-modal .lus-modal-foot .lus-btn {
    border-radius: 6px;
    height: 32px;
    line-height: 32px;
    padding: 0 16px;
    font-size: 13px;
}
.lus-modal .lus-modal-body input {
    border-radius: 6px;
}
/* type:2 iframe 层：iframe 自适应占满 */
.lus-modal .lus-modal-body iframe {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* === 登录页 === */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f766e 0%, #0b5d55 100%);
    position: relative;
    overflow: hidden;
}
.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 50%, rgba(var(--celadon-rgb), 0.12) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 50%, rgba(var(--celadon-rgb), 0.08) 0%, transparent 60%);
    pointer-events: none;
}
.login-card {
    width: 400px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    padding: 40px 36px;
    position: relative;
    z-index: 1;
}
.login-logo {
    text-align: center;
    margin-bottom: 28px;
}
.login-logo .logo-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--celadon-500), var(--celadon-700));
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
}
.login-logo h1 {
    font-size: 22px;
    color: var(--celadon-800);
    font-weight: 700;
}
.login-logo p {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 6px;
}
.login-form .lus-input {
    height: 44px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
}
.login-form .lus-input:focus {
    border-color: var(--celadon-400);
    box-shadow: 0 0 0 3px rgba(var(--celadon-rgb), 0.1);
}
.login-btn {
    height: 44px;
    background: linear-gradient(135deg, var(--celadon-500), var(--celadon-700));
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: opacity 0.2s;
}
.login-btn:hover {
    opacity: 0.92;
    background: linear-gradient(135deg, var(--celadon-600), var(--celadon-800));
    color: #fff;
}
.login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
    color: var(--text-muted);
}
/* 登录页底部备案号（fixed 贴底居中，不影响登录卡片布局） */
.login-bottom-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 12px;
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
    z-index: 10;
    pointer-events: none;
}
.login-bottom-bar a {
    color: inherit;
    text-decoration: none;
    pointer-events: auto;
}
.login-bottom-bar a:hover { color: var(--primary-color); }
.login-link {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
}
.login-link a {
    color: var(--celadon-600);
}

/* === 工作台卡片 === */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.dashboard-grid.lg {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
@media (max-width: 1200px) {
    .dashboard-grid.lg {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    .dashboard-grid.lg {
        grid-template-columns: 1fr;
    }
}
.stat-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 18px;
    transition: box-shadow 0.2s, transform 0.2s;
}
.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
}
.dashboard-grid.lg .stat-icon {
    width: 64px;
    height: 64px;
    font-size: 28px;
    border-radius: 14px;
}
/* stat-icon 多彩色装饰（8 色点缀，清爽办公风） */
.stat-icon.red     { background: #FEE2E2; color: var(--accent-red); }
.stat-icon.green   { background: #D1FAE5; color: var(--accent-green); }
.stat-icon.blue    { background: #DBEAFE; color: var(--accent-blue); }
.stat-icon.orange  { background: #FEF3C7; color: var(--accent-orange); }
.stat-icon.amber   { background: #FED7AA; color: var(--accent-amber); }
.stat-icon.purple  { background: #EDE9FE; color: var(--accent-purple); }
.stat-icon.cyan    { background: #CFFAFE; color: var(--accent-cyan); }
.stat-icon.pink    { background: #FCE7F3; color: var(--accent-pink); }
.stat-info .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}
.dashboard-grid.lg .stat-info .stat-value {
    font-size: 34px;
}
.stat-info .stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* 工作台欢迎横幅（对齐主项目租户端：白底紧凑条 + 左侧竖条 accent + 右侧日期） */
.workbench-welcome {
    background: #fff;
    color: var(--text-primary);
    border: 1px solid #eceef2;
    border-radius: 8px;
    padding: 10px 22px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}
.welcome-info {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}
.workbench-welcome h2 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 0;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}
.workbench-welcome h2::before {
    content: "";
    width: 4px;
    height: 15px;
    border-radius: 2px;
    background: var(--menu-accent);
}
.workbench-welcome p {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.welcome-extra {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 16px;
    white-space: nowrap;
}
.welcome-extra .ws-value {
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    color: var(--menu-accent);
    font-variant-numeric: tabular-nums;
}
.welcome-extra .ws-label {
    font-size: 13px;
    color: var(--text-muted);
}

/* === 内容卡片 === */
.content-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    margin-bottom: 16px;
    border: 1px solid #EEF0F3;
}
.content-card .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #EEF0F3;
}
.content-card .card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}
.content-card .card-more {
    font-size: 14px;
    color: var(--celadon-600);
    cursor: pointer;
}
.quick-action-item {
    text-align: center;
    padding: 18px 12px;
    background: var(--celadon-50);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}
.quick-action-item:hover {
    background: var(--celadon-100);
    transform: translateY(-2px);
}
.quick-action-item i.lus-icon[data-lus-icon="1"] {
    width: 40px;
    height: 40px;
    margin: 0 auto;
    border-radius: 8px;
    color: #fff;
    background: var(--celadon-500);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-style: normal;
    font-size: 20px;
}
.quick-action-item i.lus-icon[data-lus-icon="1"] .lus-ic { width: 20px; height: 20px; }
.quick-action-item div {
    font-size: 14px;
    margin-top: 8px;
    color: var(--text-primary);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 15px;
}

/* === 表单全局样式 === */
/* 覆盖 Layui 默认 label 宽度（默认80px太窄，4个中文字会换行） */
.lus-form-label {
    width: 110px;
    padding: 9px 12px 9px 0;
    text-align: right;
    white-space: nowrap;
}
.lus-input-block {
    margin-left: 120px;
}
/* 短标签表单（2-3字）使用 .label-sm 缩窄 */
.lus-form-label.label-sm {
    width: 80px;
}
.lus-form-label.label-sm + .lus-input-block {
    margin-left: 90px;
}

/* === 模态对话框表单 === */
.saas-modal-form {
    padding: 22px 24px;
    background: #fff;
}

/* === 配置页 form-inline 布局 === */
.form-inline .lus-form-item {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
}
.form-inline .form-label {
    width: 130px;
    text-align: right;
    padding-right: 12px;
    font-size: 15px;
    color: #606266;
    flex-shrink: 0;
    white-space: nowrap;
}
.form-inline .form-input {
    flex: 1;
    max-width: 320px;
}
.form-inline .form-unit {
    margin-left: 8px;
    font-size: 14px;
    color: #909399;
    white-space: nowrap;
}
.form-inline .form-row {
    display: flex;
    align-items: center;
}

/* Layui 覆盖 - 按钮青瓷色 */
.lus-btn.primary {
    background-color: var(--primary-color, var(--celadon-500));
    border-color: var(--primary-color, var(--celadon-500));
    color: #fff;
}
.lus-btn.primary:hover {
    background-color: var(--primary-dark, var(--celadon-600));
    border-color: var(--primary-dark, var(--celadon-600));
}
.lus-btn {
    background-color: var(--primary-color, var(--celadon-500));
    border-color: var(--primary-color, var(--celadon-500));
    color: #fff;
}
.lus-btn.btn-gray {
    background-color: #fff;
    border-color: var(--border-color, #d9d9d9);
    color: var(--text-secondary, #595959);
}
.lus-btn.btn-gray:hover {
    background-color: var(--bg-soft, #f5f5f5);
    border-color: #d9d9d9;
    color: #595959;
}
.lus-btn.btn-orange {
    background-color: #f59e0b;
    border-color: #f59e0b;
    color: #fff;
}
.lus-btn.btn-orange:hover {
    background-color: #d97706;
    border-color: #d97706;
}
.lus-nav .lus-this::after {
    background-color: var(--primary-color);
}
.lus-tab-title .lus-this {
    color: var(--primary-dark);
}

/* === 共享表单组件 === */
.form-section {
    display: block;
    margin-bottom: 20px;
}
.form-section:last-child { margin-bottom: 0; }
.form-section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 14px;
    padding-left: 8px;
    border-left: 3px solid var(--primary-color);
    line-height: 1;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
    column-gap: 32px;
    align-items: start;
}
.form-grid .form-item.full { grid-column: 1 / -1; }

.form-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
}
.form-item:last-child { margin-bottom: 0; }
.form-item-label {
    flex: 0 0 auto;
    width: 100px;
    padding-right: 12px;
    text-align: right;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
}
.form-item-label.label-sm { width: 72px; }
.form-item-label.label-lg { width: 120px; }
.form-item-label .req {
    color: var(--danger);
    font-size: 14px;
    margin-right: 2px;
}
.form-item-control {
    flex: 0 0 240px;
    width: 240px;
}
.form-item-control.control-sm { flex: 0 0 160px; width: 160px; }
.form-item-control.control-lg { flex: 0 0 320px; width: 320px; }
.form-item-control.control-full { flex: 0 0 480px; width: 480px; }
.form-item-control.control-fluid { flex: 1 1 100%; width: 100%; min-width: 0; }

.form-item .lus-input,
.form-item .lus-textarea,
.form-item input[type="text"],
.form-item input[type="password"],
.form-item input[type="number"] {
    width: 100%;
    height: 32px;
    padding: 0 11px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-primary);
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
    display: block;
}
.form-item .lus-cselect {
    width: 100%;
}
.form-item .lus-cselect .lus-input {
    height: 32px;
    padding: 0 11px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-primary);
    background: #fff;
    box-sizing: border-box;
}
.form-item .lus-textarea {
    height: auto;
    min-height: 72px;
    padding: 8px 11px;
    resize: vertical;
    line-height: 1.5;
}
.form-item .lus-input:focus,
.form-item .lus-textarea:focus,
.form-item input:focus,
.form-item select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-softer);
    outline: none;
}
.form-item .lus-cselect { width: 100%; }
.form-item .lus-cselect .lus-input { width: 100%; }

.form-item-hint {
    margin-left: 10px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 32px;
}

/* --- 模态底部按钮：统一靠右下角 --- */
.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 24px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-soft);
    flex-shrink: 0;
}
/* 弹窗内不需要负 margin（content-card padding 为 0） */
.in-modal-iframe .modal-footer, .in-modal-inline .modal-footer {
    margin: 0;
    border-radius: 0;
}

/* 三段式布局：content-card 为 flex 列容器，footer 钉底（对齐平台端） */
.content-card:has(.modal-footer) {
    display: flex;
    flex-direction: column;
}
.content-card:has(.modal-footer) > form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}
/* 含多 form-section 的表单：整体表单区滚动，footer 钉底 */
.in-modal-iframe .content-card:has(.modal-footer) > form, .in-modal-inline .content-card:has(.modal-footer) > form {
    overflow-y: auto;
}
.modal-footer .lus-btn {
    height: 32px;
    line-height: 32px;
    padding: 0 16px;
    font-size: 13px;
    border-radius: 6px;
}
.modal-footer .lus-btn-primary {
    background: #fff;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}
.modal-footer .lus-btn-primary:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* --- 内容卡片（共享组件版） --- */
.content-card {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: var(--shadow-xs, 0 1px 2px rgba(0,0,0,0.03));
    overflow: hidden;
}
.td-label {
    background: #F5F7F6;
    font-weight: 500;
    color: var(--text-muted);
    width: 140px;
}
.content-card .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-light);
}
.content-card .card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}
.content-card .card-body { padding: 18px 20px; }

/* --- 弹窗 iframe 内（基础重置，对齐平台端） --- */
.in-modal-iframe,
.in-modal-inline,
.in-modal-iframe body, .in-modal-inline body {
    background: #fff;
}
.in-modal-iframe html,
.in-modal-inline html,
.in-modal-iframe body, .in-modal-inline body {
    height: 100%;
    margin: 0;
    overflow: hidden;
    width: 100%;
}
/* 对齐参考项目：block 布局 + content-card 固定高度撑满 iframe，form 内滚动 */
body.in-modal-iframe, body.in-modal-inline {
    display: block;
    min-width: auto !important;
    overflow-x: hidden;
}
.in-modal-iframe .page-container, .in-modal-inline .page-container {
    padding: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
.in-modal-iframe .content-card, .in-modal-inline .content-card {
    background: #fff;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    border: none;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.in-modal-iframe .content-card .card-header { display: none; }
.in-modal-iframe .saas-modal-form, .in-modal-inline .saas-modal-form {
    padding: 20px 24px;
    background: #fff;
    border: none;
    border-radius: 0;
    box-shadow: none;
    max-width: none;
    margin: 0;
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
}
/* 弹窗内 form 滚动：当 content-card 含 modal-footer 时，form 占满剩余高度并滚动 */
.in-modal-iframe .content-card:has(.modal-footer) > .saas-modal-form,
.in-modal-inline .content-card:has(.modal-footer) > .saas-modal-form,
.in-modal-iframe .content-card:has(.modal-footer) > .lus-form,
.in-modal-inline .content-card:has(.modal-footer) > .lus-form,
.in-modal-iframe .content-card:has(.modal-footer) > form, .in-modal-inline .content-card:has(.modal-footer) > form {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

/* --- 弹窗内 form 自定义滚动条（细条+浅灰，与平台端一致） --- */
.in-modal-iframe .content-card > form, .in-modal-inline .content-card > form {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}
.in-modal-iframe .content-card > form::-webkit-scrollbar, .in-modal-inline .content-card > form::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
.in-modal-iframe .content-card > form::-webkit-scrollbar-track, .in-modal-inline .content-card > form::-webkit-scrollbar-track {
    background: transparent;
}
.in-modal-iframe .content-card > form::-webkit-scrollbar-thumb, .in-modal-inline .content-card > form::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}
.in-modal-iframe .content-card > form::-webkit-scrollbar-thumb:hover, .in-modal-inline .content-card > form::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}
.in-modal-iframe .content-card > form > *, .in-modal-inline .content-card > form > * {
    flex-shrink: 0;
}
/* footer 始终贴底：form 用 flex:1 1 auto 撑满剩余空间，把 footer 顶到底边 */
.in-modal-iframe .content-card > .modal-footer,
.in-modal-inline .content-card > .modal-footer,
.content-card.has-footer > .modal-footer {
    flex: 0 0 auto;
}

/* ================================================================
   抽屉三段式布局 v2（content-drawer）：
   内容页 .modal-footer 由抽屉提取到 drawer 底部钉底；form 内容完整
   展开（不再被压缩成内部滚动），分区卡片完整显示，drawer-body 统一滚动。
   覆盖 in-modal-iframe 的"content-card 固定高度 + form 内部滚动"规则。
   ================================================================ */
.content-drawer > .modal-footer.content-drawer-footer {
    flex: 0 0 auto;
    background: #fff;
    border-top: 1px solid #eef0f3;
    margin: 0;
    padding: 12px 24px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    border-radius: 0 0 12px 12px;
}
.content-drawer .drawer-body .page-container {
    height: auto !important;
    overflow: visible !important;
    flex: none !important;
}
.content-drawer .drawer-body .content-card,
.content-drawer .drawer-body .in-modal-iframe .content-card,
.content-drawer .drawer-body .in-modal-inline .content-card {
    height: auto !important;
    flex: none !important;
    overflow: visible !important;
}
.content-drawer .drawer-body .content-card > form,
.content-drawer .drawer-body .content-card > .saas-modal-form,
.content-drawer .drawer-body .content-card > .lus-form,
.content-drawer .drawer-body .in-modal-iframe .content-card > form,
.content-drawer .drawer-body .in-modal-inline .content-card > form {
    flex: none !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
}

/* ================================================================
   [6] 弹窗-普通表单（data-layout="form"）
   弹窗表单默认单列布局（整齐有序）；由 common.js 动态判断：
   字段≥6个时切换多列，充分利用弹窗宽度
   ================================================================ */
.in-modal-iframe form[data-layout="form"], .in-modal-inline form[data-layout="form"] {
    display: block;
    padding: 20px 24px;
    background: #fff;
    border: none;
    border-radius: 0;
}
/* JS 切换多列布局时添加 .form-multi-cols，列数按弹窗宽度自适应 */
.in-modal-iframe form[data-layout="form"].form-multi-cols, .in-modal-inline form[data-layout="form"].form-multi-cols {
    display: grid;
    /* 每列最小360px（label100+输入240+间距），自动排列2/3/4列 */
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 0 32px;       /* 列间距 32px，行间距 0（由 form-item margin 控制） */
    align-items: start;
}
/* 整行字段（textarea、选项区、说明文字等）占满整行 */
.in-modal-iframe form[data-layout="form"] .lus-form-item.full-row,
.in-modal-inline form[data-layout="form"] .lus-form-item.full-row,
.in-modal-iframe form[data-layout="form"] .lus-form-item[style*="display:none"], .in-modal-inline form[data-layout="form"] .lus-form-item[style*="display:none"] {
    grid-column: 1 / -1;
}
/* 兼容租户端旧版 lus-form-item 弹窗表单 */
.in-modal-iframe form[data-layout="form"] .lus-form-item, .in-modal-inline form[data-layout="form"] .lus-form-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;   /* 行间距 16px */
}
.in-modal-iframe form[data-layout="form"] .lus-form-label, .in-modal-inline form[data-layout="form"] .lus-form-label {
    flex: 0 0 auto;
    width: 100px;
    padding-right: 12px;
    text-align: right;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 32px;
    height: 32px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.in-modal-iframe form[data-layout="form"] .lus-input-block, .in-modal-inline form[data-layout="form"] .lus-input-block {
    flex: 0 0 auto;
    margin-left: 0;
    min-height: auto;
}
/* 整行字段（full-row：表格/文本域/选项区等）的 input-block 撑满整行，
   覆盖上方 240px 固定宽（否则组合明细表格/长文本被压缩在 240px 内） */
.in-modal-iframe form[data-layout="form"] .lus-form-item.full-row .lus-input-block,
.in-modal-inline form[data-layout="form"] .lus-form-item.full-row .lus-input-block {
    flex: 1 1 auto;
    width: 100%;
}
/* 输入框按类型设置合理固定宽度（内联 style 优先级更高，可覆盖） */
.in-modal-iframe form[data-layout="form"] .lus-input-block .lus-input,
.in-modal-inline form[data-layout="form"] .lus-input-block .lus-input,
.in-modal-iframe form[data-layout="form"] .lus-input-block select, .in-modal-inline form[data-layout="form"] .lus-input-block select {
    width: 100%;
    max-width: 240px;       /* 普通文本 240px */
}
.in-modal-iframe form[data-layout="form"] .lus-input-block input[type="number"], .in-modal-inline form[data-layout="form"] .lus-input-block input[type="number"] {
    width: 100%;
    max-width: 160px;       /* 短数字 160px */
}
.in-modal-iframe form[data-layout="form"] .lus-input-block textarea, .in-modal-inline form[data-layout="form"] .lus-input-block textarea {
    width: 100%;
    max-width: 480px;       /* 长文本 textarea 480px */
    min-height: 80px;
    padding: 8px 11px;
    line-height: 1.5;
}
.in-modal-iframe form[data-layout="form"] .lus-input-block .lus-cselect, .in-modal-inline form[data-layout="form"] .lus-input-block .lus-cselect {
    width: 100%;
    max-width: 240px;
}
.in-modal-iframe form[data-layout="form"] .lus-form-item .lus-input,
.in-modal-inline form[data-layout="form"] .lus-form-item .lus-input,
.in-modal-iframe form[data-layout="form"] .lus-form-item select, .in-modal-inline form[data-layout="form"] .lus-form-item select {
    height: 32px;
    padding: 0 11px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
}
.in-modal-iframe form[data-layout="form"] .lus-form-item .lus-input:focus,
.in-modal-inline form[data-layout="form"] .lus-form-item .lus-input:focus,
.in-modal-iframe form[data-layout="form"] .lus-form-item select:focus, .in-modal-inline form[data-layout="form"] .lus-form-item select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-softer);
    outline: none;
}
.in-modal-iframe form[data-layout="form"] .lus-form-item .lus-form-mid, .in-modal-inline form[data-layout="form"] .lus-form-item .lus-form-mid {
    line-height: 32px;
    padding: 0 0 0 10px;
}
.in-modal-iframe form[data-layout="form"] .lus-form-item .lus-btn + .lus-btn, .in-modal-inline form[data-layout="form"] .lus-form-item .lus-btn + .lus-btn {
    margin-left: 8px;
}
.in-modal-iframe form[data-layout="form"] .lus-form-item:last-child, .in-modal-inline form[data-layout="form"] .lus-form-item:last-child {
    margin-bottom: 0;
    margin-top: 8px;
}

/* === 双列表单布局（字段较多的基础资料弹窗） ===
   用法：在 form 上加 class="form-2col"，字段自动两列排列
   需要跨整行的 item（地址/备注）加 class="full-row" */
.in-modal-iframe form[data-layout="form"].form-2col, .in-modal-inline form[data-layout="form"].form-2col {
    display: grid;
    /* 容器自适应列数：内容宽 ≥632px 时 2 列，窄弹窗（如 480px）自动降为 1 列，
       避免固定 2 列在窄容器下 label+input 被挤压导致布局混乱（UI 独立性） */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    column-gap: 32px;       /* 列间距 32px */
    row-gap: 16px;          /* 行间距 16px */
    padding: 20px 24px;
}
.in-modal-iframe form[data-layout="form"].form-2col .lus-form-item, .in-modal-inline form[data-layout="form"].form-2col .lus-form-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0;  /* grid 的 row-gap 已控制行距 */
}
.in-modal-iframe form[data-layout="form"].form-2col .lus-form-item.full-row, .in-modal-inline form[data-layout="form"].form-2col .lus-form-item.full-row {
    grid-column: 1 / -1;  /* 跨整行 */
}
.in-modal-iframe form[data-layout="form"].form-2col .lus-form-item .lus-input-block,
.in-modal-inline form[data-layout="form"].form-2col .lus-form-item .lus-input-block,
.in-modal-iframe form[data-layout="form"].form-2col .lus-form-item .lus-input-inline,
.in-modal-inline form[data-layout="form"].form-2col .lus-form-item .lus-input-inline {
    flex: 1 1 auto;       /* 输入框占满剩余宽度 */
    margin-left: 0;
    min-height: auto;
}
.in-modal-iframe form[data-layout="form"].form-2col .lus-form-item .lus-input-block .lus-input,
.in-modal-inline form[data-layout="form"].form-2col .lus-form-item .lus-input-block .lus-input,
.in-modal-iframe form[data-layout="form"].form-2col .lus-form-item .lus-input-inline .lus-input,
.in-modal-inline form[data-layout="form"].form-2col .lus-form-item .lus-input-inline .lus-input,
.in-modal-iframe form[data-layout="form"].form-2col .lus-form-item .lus-input-block select,
.in-modal-inline form[data-layout="form"].form-2col .lus-form-item .lus-input-block select,
.in-modal-iframe form[data-layout="form"].form-2col .lus-form-item .lus-input-inline select,
.in-modal-inline form[data-layout="form"].form-2col .lus-form-item .lus-input-inline select {
    width: 100%;
    max-width: 100%;     /* 双列下输入框占满 cell，不再固定 240px */
}
.in-modal-iframe form[data-layout="form"].form-2col .lus-form-item .lus-input-block textarea,
.in-modal-inline form[data-layout="form"].form-2col .lus-form-item .lus-input-block textarea {
    width: 100%;
    max-width: 100%;
    min-height: 60px;
}
/* form-2col 布局下的 .lus-inline（同组横排字段）：
   与 complex 布局同规则——必须是 flex 容器让 label/输入框/按钮同一行对齐；
   否则 label 走 lus-basic 的 float 基础样式，输入框被挤到下一行（"备注在输入上面"） */
.in-modal-iframe form[data-layout="form"].form-2col .lus-form-item .lus-inline,
.in-modal-inline form[data-layout="form"].form-2col .lus-form-item .lus-inline {
    display: flex;
    align-items: center;
    margin-right: 16px;
    margin-bottom: 0;
    flex: 1 1 auto;
    min-width: 0;
}
.in-modal-iframe form[data-layout="form"].form-2col .lus-form-item .lus-inline .lus-form-label,
.in-modal-inline form[data-layout="form"].form-2col .lus-form-item .lus-inline .lus-form-label {
    flex: 0 0 100px;
    width: 100px;
    padding-right: 12px;
    text-align: right;
    box-sizing: border-box;
    float: none;
}
.in-modal-iframe form[data-layout="form"].form-2col .lus-form-item .lus-inline .lus-input-inline,
.in-modal-inline form[data-layout="form"].form-2col .lus-form-item .lus-inline .lus-input-inline {
    flex: 1 1 auto;
    margin-left: 0;
    min-width: 0;
}
.in-modal-iframe form[data-layout="form"].form-2col .lus-form-item .lus-inline .lus-input-inline .lus-input,
.in-modal-inline form[data-layout="form"].form-2col .lus-form-item .lus-inline .lus-input-inline select,
.in-modal-iframe form[data-layout="form"].form-2col .lus-form-item .lus-inline .lus-input-inline .lus-select {
    width: 100%;
    max-width: 100%;
}
.in-modal-iframe form[data-layout="form"].form-2col .lus-form-item .lus-inline .lus-btn,
.in-modal-inline form[data-layout="form"].form-2col .lus-form-item .lus-inline .lus-btn {
    flex: 0 0 auto;
    margin-left: 8px;
}

/* ================================================================
   [7] 弹窗-单据式（data-layout="bill"）
   结构：.bill-sheet > .bill-head(单据头三栏) + .bill-grid(明细表格) + .bill-foot(备注+金额横排+制单人)
   在 saas-modal-form 内嵌套使用，不破坏外层卡片
   ================================================================ */
.bill-sheet { background:#fff; }
/* 单据头：弹性单行横排（参考暮豆 con-header），格子按内容分配并平均拉伸填满单行，
   编号格优先吸收剩余宽度让长单号完整显示；格子≥8 个时自动退化为等宽网格多行排布 */
.bill-head {
    display: flex;
    flex-wrap: nowrap;          /* 单行不换行，杜绝单据头被拆成两行 */
    align-items: center;
    gap: 8px 16px;              /* 列间距统一 16px，行间距 8px，各区域间隔协调 */
    padding: 6px 0 10px 0;
    margin: 0 0 12px 0;         /* 取消 common.css 的负外边距，单据头与下方明细表左对齐 */
    background: transparent;    /* 取消 common.css 的灰底色，单据头不再有底色 */
    border-bottom: 1px solid #EEF0F2;
}
.bill-head .bh-cell {
    flex: 1 1 auto;             /* 内容宽度优先，空间富余时按比例拉伸填满单行 */
    min-width: 0;
    /* label 与控件文字垂直居中对齐（用户反馈 flex-end 时 label 文字偏下、控件文字偏高，
       视觉上"单据编号/单据日期 与值不在一行"）；控件高度统一 28px 后下划线仍在同一水平线 */
    display: flex; align-items: center;
    padding: 4px 0;
}
/* 含按钮的格子（BOM 选择等）：保底宽度，保证输入框 + 按钮不被压缩 */
.bill-head .bh-cell:has(.lus-btn) { flex: 1.4 1 auto; min-width: 135px; }
/* 日期格子：保底宽度收窄（input 本身已 95px），把空间让给编号格 */
.bill-head .bh-cell:has(input[name*="date"]) { flex: 0.8 1 auto; min-width: 100px; }
/* 单据编号格：flex 权重适中，空间富余时吸收部分剩余宽度让长单号显示完整；
   min-width 150 保底，编号短时按内容收缩避免留白过长（横线随内容不随格子延伸） */
.bill-head .bh-cell:has(.bill-no-text) { flex: 1 1 auto; min-width: 150px; }
/* 格子过多（≥8 个：报工/合同/促销等单据头）：退化为等宽网格自动换行，避免格子被压扁 */
.bill-head:has(> .bh-cell:nth-child(8)) {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 8px 16px;
}
/* 网格布局下取消单格保底宽度（flex 专用），避免长单号格撑破网格列 */
.bill-head:has(> .bh-cell:nth-child(8)) .bh-cell { min-width: 0; }
.bill-head .bh-cell .bh-label {
    flex: 0 0 auto;
    min-width: 72px;
    padding-right: 8px;
    color: #6B7280; font-size: 14px;
    text-align: right;
    white-space: nowrap;
    box-sizing: border-box;
    /* 长 label（如"关联生产订单"6字≈84px）超过 72px 会溢出盖住右侧控件：
       允许按内容自适应撑宽（短 label 仍 72px 右对齐不变）；极端情况省略号兜底 */
    overflow: hidden;
    text-overflow: ellipsis;
}
.bill-head .bh-cell .bh-ctn { flex: 1 1 auto; min-width: 0; }
/* 按钮固定不收缩，保证 BOM 选择等按钮始终可见（下拉/日历面板依赖未裁剪的祖先） */
.bill-head .bh-cell .bh-ctn .lus-btn { flex: 0 0 auto; }
/* 单据头控件统一暮豆横线风格：去掉四边框盒，只保留底部 1px 细线，紧凑贴合内容，focus 变青瓷绿
   线色用浅灰 #d8dee8（比 #cbd5e1 更淡），视觉上更细更轻 */
.bill-head .bh-cell .bh-ctn .lus-input {
    height: 28px !important;   /* !important 防 lus-basic .lus-input height:38 及他处覆盖，保证与 cselect/bill-no-text 下划线齐平 */
    line-height: 28px;
    border: none; border-bottom: 1px solid #d8dee8; border-radius: 0;
    background: transparent;
    font-size: 13px; color: #111827;
    padding: 0 2px;
    width: 160px; max-width: 100%;
    min-width: 0;   /* 允许 flex 收缩，防止撑出格子边界 */
    box-sizing: border-box; /* 与 lus-cselect-trigger 高度一致，避免下划线偏移 */
    display: block; /* 消除 inline 元素在 flex 中的亚像素基线偏移（input 渲染 top 多 0.5px） */
    outline: none; box-shadow: none !important; /* 防 lus-basic .lus-input:focus 的 3px 光环 */
}
.bill-head .bh-cell .bh-ctn .lus-input:focus {
    border-bottom-color: #0d9488; box-shadow: none !important; outline: none;
}
/* 下拉选择：横线风格（箭头灰色，面板保持默认）
   高度固定 28px 并收紧，让底部横线与 label 文字基线齐平（实测 33px 时横线比 label 低 6px，离得远） */
.bill-head .bh-cell .bh-ctn .lus-cselect {
    height: 28px !important;   /* 防 liusu.css .lus-cselect-trigger 默认 34px 覆盖，与 input/bill-no-text 下划线齐平 */
    box-sizing: border-box;
    width: 120px; max-width: 100%;
    border: none; border-bottom: 1px solid #d8dee8;
    background: transparent; border-radius: 0;
}
.bill-head .bh-cell .bh-ctn .lus-cselect .lus-cselect-trigger {
    height: 28px !important; line-height: 28px;
    position: relative;
    /* 清掉组件默认白底+四边框（横线由外层 .lus-cselect holder 的 border-bottom 提供，避免双线） */
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}
.bill-head .bh-cell .bh-ctn .lus-cselect .lus-cselect-trigger input {
    height: 28px; line-height: 28px;
    border: none; background: transparent;
    font-size: 13px; color: #111827; padding: 0 18px 0 2px;
}
/* 下拉指示：三角形改为三个小点（省略号），更轻盈。
   注意：不能隐藏整个 trigger（会连带隐藏 label，导致下拉不可见不可点），只隐藏内置 down 箭头图标 */
.bill-head .bh-cell .bh-ctn .lus-cselect .lus-cselect-trigger {
    position: relative;
}
.bill-head .bh-cell .bh-ctn .lus-cselect .lus-cselect-trigger .lus-ic {
    display: none;
}
.bill-head .bh-cell .bh-ctn .lus-cselect .lus-cselect-trigger .lus-cselect-label {
    display: block;
    padding-right: 18px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 28px;
    font-size: 13px;
    color: #111827;
}
.bill-head .bh-cell .bh-ctn .lus-cselect .lus-cselect-trigger::after {
    content: '⋯';
    position: absolute;
    right: 2px; top: 50%;
    transform: translateY(-50%);
    font-size: 13px; line-height: 1;
    color: #94a3b8;
    letter-spacing: 1px;
    pointer-events: none;
}
.bill-head .bh-cell .bh-ctn .lus-cselect dl {
    z-index: 20;
}
/* 单据编号：纯文本显示，不用输入框（不换行，超长省略兜底） */
/* 长单号完整显示：编号格 min-width 230px + flex 2.2 优先吸收剩余宽度；
   ellipsis 仅作为极端窄屏兜底 */
.bill-head .bh-cell .bh-ctn .bill-no-text {
    color: #111827; font-weight: 500; line-height: 28px;   /* 与 input/cselect trigger 统一 28px，下划线齐平 */
    font-size: 13px;   /* 与单据头其他控件同字号 */
    padding: 0 2px;
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}
/* 单据头日期字段：横线宽度收紧到内容所需（"2026-08-13"≈85px），
   省出的空间弹性让给单据编号格，低分辨率下编号能完整显示；
   150px 时日期横线比内容长近一倍，浪费空间还挤压编号格 */
.bill-head .bh-cell .bh-ctn input[name*="date"] {
    width: 95px;
    max-width: 95px;
    height: 28px; line-height: 28px;
    border: none;
    border-bottom: 1px solid #d8dee8;
    border-radius: 0;
    background: transparent;
    padding: 0 2px;
    color: #111827;
    font-size: 13px;
    box-sizing: border-box;
    display: block; /* 与通用 lus-input 一致，消除亚像素偏移 */
}
.bill-head .bh-cell .bh-ctn input[name*="date"]:focus {
    border-bottom-color: #0d9488;
    box-shadow: none;
}
.bill-head .bh-cell .bh-ctn .bill-no-text .no-placeholder { color: #9CA3AF; font-weight: 400; }
/* 关联单据选择行：文本 + 图标组横排，单号超长自动省略，图标固定不收缩；
   底部横线与单据头其他字段（input/cselect）下划线统一，3 点图标落在横线上 */
.bill-head .bh-cell.bh-cell-ref { flex: 0 1 auto; min-width: 260px; }
.bill-head .bh-cell .bh-ctn.bh-ctn-ref {
    display: flex; align-items: center; gap: 6px;
    border-bottom: 1px solid #d8dee8;
    height: 28px;              /* 与 input/cselect trigger 等高，下划线位置完全一致 */
    box-sizing: border-box;
    padding-bottom: 0;
}
/* 生产管理（领料/完工入库/报工等）关联工单：容器已提供下划线，input 自身去掉边框避免双线 */
.bill-head .bh-cell .bh-ctn.bh-ctn-ref .lus-input {
    border: none !important;
    background: transparent !important;
    width: auto;               /* 宽度由 flex 控制（flex:1），不再固定 160px 造成横向过长 */
    flex: 1 1 auto;
    min-width: 0;
}
.bill-head .bh-cell .bh-ctn.bh-ctn-ref .bill-no-text {
    flex: 1 1 auto; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    /* 右侧留位给两个图标：3 点选择(right:6px,16px宽) + 清除叉(right:30px,14px宽→左缘距右44px)，
       需 ≥46px 才不会被叉压住单号末尾；取 48px 留 4px 间隙 */
    padding: 0 48px 0 0;
}
.bill-head .bh-cell .bh-ctn.bh-ctn-ref .lus-btn {
    flex: 0 0 auto;
    margin-left: 0 !important;
    height: 28px; line-height: 28px;
    padding: 0 9px;
    font-size: 12px;
}
.bill-head .bh-cell .bh-ctn.bh-ctn-ref .lus-btn .lus-icon { font-size: 13px; margin-right: 2px; }
/* 单据编号：与关联单据一致，底部加横线（bill-no-text 所在格子统一画细线） */
.bill-head .bh-ctn:has(.bill-no-text) {
    border-bottom: 1px solid #d8dee8;
    min-height: 28px;
    box-sizing: border-box;
}
/* 单据编号格（非关联单据）横线随内容，不随格子延伸：
   ctn 按内容宽度显示，避免编号格 flex 吸收剩余空间把横线拉长到右侧；
   .bh-cell-ref（关联单据）保持 flex 布局不受影响 */
.bill-head .bh-cell:has(.bill-no-text):not(.bh-cell-ref) .bh-ctn {
    display: inline-block;
    width: auto;
    max-width: 100%;
    min-width: 0;
}


/* 单据明细表格：紧凑可编辑，窄屏自动横向滚动避免内容被遮挡（参考老版 jqGrid：无外层边框，只保留单元格行间线） */
.bill-grid { width:100%; border:none; overflow-x:auto; -webkit-overflow-scrolling:touch; }
.bill-grid .lus-table { margin:0; table-layout: fixed; min-width: 1200px; width: 100%; border-collapse: collapse; }
.bill-grid .lus-table thead th { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bill-grid .lus-table tbody td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bill-grid .lus-table colgroup col.col-goods { width: 200px; }
/* 序号/操作列固定宽度：table-layout:fixed 下未定义 width 的列会被自动压缩到 0~几像素，
   border-right 在 sub-pixel 宽度下渲染丢失，导致"序号和 + 之间有的有竖线有的没有"。
   强制给最小宽度，保证竖线正常显示（明细表格内所有模板统一处理） */
.bill-grid .lus-table th.col-row-num, .bill-grid .lus-table td.col-row-num { width: 50px; min-width: 50px; }
.bill-grid .lus-table th.col-oper,    .bill-grid .lus-table td.col-oper    { width: 90px; min-width: 90px; }
.bill-grid .lus-table thead tr { background:#F8FAFB; }
/* 表头：参考 lus-grid（登录日志表格，右边框+下边框网格线）+ 老版 jqGrid 紧凑行高
   上边框补齐：表头行上方闭合，避免"上无框下有框"的缺口感 */
.bill-grid .lus-table thead th {
    height: 36px; padding: 0 6px;
    font-size: 12.5px; color:#374151; font-weight: 700;
    border-top: 1px solid #E4E7EE !important;
    border-right: 1px solid #E4E7EE !important;
    border-bottom: 1px solid #DDE1E8 !important;
    background: #F8FAFB;
    text-align: center !important;
    vertical-align: middle !important;
    letter-spacing: 0.3px;
}
.bill-grid .lus-table thead th:first-child { border-left: 1px solid #E4E7EE !important; }
/* 单元格：参考 lus-grid（登录日志表格，每格右边框+下边框完整网格线）+ 老版 jqGrid 紧凑行高 */
.bill-grid .lus-table tbody td {
    padding: 0 2px !important;
    border-right: 1px solid #EEF0F3 !important;
    border-bottom: 1px solid #D6DEE3 !important;
    height: 36px !important;
    text-align: center !important;
    vertical-align: middle !important;
}
.bill-grid .lus-table tbody td:first-child { border-left: 1px solid #E4E7EE !important; }
.bill-grid .lus-table tbody tr:nth-child(even) { background:#F9F9F9; }
.bill-grid .lus-table tbody tr:hover { background:#F0FAF5; }
.bill-grid .lus-input {
    width: 100% !important; box-sizing: border-box;   /* 撑满单元格，消除四周留白浪费 */
    height: 32px; padding: 0 4px;   /* 收紧内边距，把空间留给数字本身（金额不再被裁） */
    border: 1px solid transparent; border-radius: 4px;
    background: transparent; font-size: 13px;
    text-align: center;
}
.bill-grid .lus-input:focus {
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 2px var(--primary-softer);
}
.bill-grid .lus-input[readonly] {
    color: #6B7280; background: transparent;
}
/* 数值列（数量/单价/金额/税率/税额/价税合计）：统一居中，与规格/条码等列对齐一致
   （用户反馈：数值列右对齐与其余列不一致，视觉割裂；ERP 单据习惯也可以右对齐，如需恢复删掉此节即可） */
.bill-grid .d-quantity, .bill-grid .d-price, .bill-grid .d-amount,
.bill-grid .d-tax-rate, .bill-grid .d-tax-amount, .bill-grid .d-total {
    text-align: center !important;
}
/* 明细表格数字输入框（数量/单价/税率）隐藏浏览器原生上下箭头（±），
   否则箭头浮在输入框右侧会把数值右半截遮挡；隐藏后数值完整可见，仍可正常键盘输入 */
.bill-grid .lus-input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}
.bill-grid .lus-input[type=number]::-webkit-inner-spin-button,
.bill-grid .lus-input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
/* 全站 number 输入框统一隐藏微调按钮：
   火狐（Firefox）默认给 number 微调按钮带灰色底色，Chrome/Edge 默认透明且 hover 才显示，
   导致"只有火狐有底色"的跨浏览器不一致；-moz-appearance:textfield 是火狐官方方案
   （liusu.css 分页跳转已用），隐藏后三端一致，数字仍可正常键盘输入 */
input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.bill-grid .pick-btn {
    display: inline-block; width: 24px; height: 24px;
    line-height: 24px; text-align: center;
    border: 1px solid #D1D5DB; border-radius: 4px;
    color: #6B7280; cursor: pointer; margin-right: 4px;
    background: #fff;
}
.bill-grid .pick-btn:hover { color: var(--primary-color); border-color: var(--primary-color); }
.bill-grid .del-btn {
    color: #EF4444; cursor: pointer;
}
.bill-grid .mat-name { color:#111827; font-size:13px; }

/* 表格底部工具栏 */
.bill-grid-bar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0;
}

/* 扫码枪开关：表头小标签，激活后商品列变为扫码输入状态 */
.bar-code-insert {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 8px;
    font-size: 12px; font-weight: 100;
    color: #fff; background-color: #B1B1B1;
    border-radius: 2px; line-height: 18px; height: 20px;
    cursor: pointer;
    vertical-align: middle;
    user-select: none;
}
.bar-code-insert.active {
    background-color: var(--primary-color);
}

/* 单行备注：紧贴金额区上方 */
.bill-note-line {
    display: flex; align-items: center;
    padding: 6px 0;
    margin-bottom: 8px;
}
.bill-note-line .bn-label {
    flex: 0 0 60px;
    color: #6B7280; font-size: 13px;
}
.bill-note-line .bn-input {
    flex: 1 1 auto;
    height: 30px; padding: 0 9px;
    border: 1px solid #E5E7EB; border-radius: 4px;
    font-size: 13px;
    background: #fff;
    outline: none;
}
.bill-note-line .bn-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-softer);
}

/* 扫码成功/失败提示动画 */
@keyframes scanFlash {
    0% { background-color: #D1FAE5; }
    100% { background-color: transparent; }
}
.scan-flash { animation: scanFlash 0.6s ease-out; }
@keyframes scanShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}
.scan-shake { animation: scanShake 0.3s ease-in-out; }

/* 操作列：行号 + 图标按钮组（参考暮豆 billsOper_goods） */
.bill-grid .col-row-num {
    width: 40px; text-align: center;
    color: #9CA3AF; font-size: 12px;
    background: #FAFBFC;
    border-right: 1px solid #F1F2F4;
    position: sticky; left: 0; z-index: 2;
}
.bill-grid .col-oper {
    width: 96px; text-align: center;
    background: #FAFBFC;
    border-right: 1px solid #F1F2F4;
    position: sticky; left: 40px; z-index: 2;
    box-shadow: 2px 0 4px -2px rgba(0,0,0,0.06);
}
.bill-grid .col-oper .oper-group {
    display: inline-flex; align-items: center; gap: 6px;
}
.bill-grid .col-oper .oper-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px;
    color: #6B7280; cursor: pointer;
    border-radius: 3px;
    transition: all 0.15s;
}
.bill-grid .col-oper .oper-icon:hover {
    color: var(--primary-color);
    background: var(--primary-softer);
}
.bill-grid .col-oper .oper-icon.del:hover {
    color: #EF4444;
    background: #FEE2E2;
}
.bill-grid .col-oper .oper-icon .lus-icon {
    font-size: 14px;
}

/* 商品列：单元格即输入框（参考暮豆 goods 列） */
.bill-grid td.col-goods {
    position: relative;
    padding: 4px 24px 4px 6px;
}
.bill-grid td.col-goods .goods-input {
    width: 100%;
    height: 32px;
    padding: 0 26px 0 8px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    font-size: 13px;
    outline: none;
    text-align: left;
}
.bill-grid td.col-goods .goods-input:focus {
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 2px var(--primary-softer);
}
.bill-grid td.col-goods .goods-input::placeholder {
    color: #C9CDD4;
}
/* 商品列右侧的"三个小点"选择按钮：常显（老版本风格），hover 加深 */
.bill-grid td.col-goods .goods-pick {
    position: absolute;
    right: 4px; top: 50%;
    transform: translateY(-50%);
    width: 20px; height: 20px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #9CA3AF; cursor: pointer;
    border-radius: 3px;
    opacity: 0.6; /* 常显 */
    transition: opacity 0.15s, color 0.15s, background 0.15s;
}
.bill-grid td.col-goods:hover .goods-pick,
.bill-grid td.col-goods .goods-input:focus ~ .goods-pick {
    opacity: 1; /* hover或focus时显示 */
}
.bill-grid td.col-goods .goods-pick:hover {
    color: var(--primary-color);
    background: var(--primary-softer);
}
.bill-grid td.col-goods .goods-pick .lus-icon {
    font-size: 14px;
}
/* 扫码枪激活时商品输入框的样式提示 */
.bill-grid.scan-mode td.col-goods .goods-input {
    background: #F0FDFA;
    border-color: #A7F3D0;
}
.bill-grid.scan-mode td.col-goods .goods-input::placeholder {
    color: #065F46;
}
/* 商品名称过长时省略号显示（已选商品只读状态） */
.bill-grid td.col-goods .goods-text {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
    color: #111827;
    font-size: 13px;
    line-height: 28px;
    padding: 0 6px;
}

/* 仓库列：每行可单独选择仓库
   浅色白底（明确 background-color:#fff 排除系统深灰原生渲染）+ 浅灰细边框 + 三点图标 */
.bill-grid td.col-location {
    padding: 4px 6px;
}
.bill-grid td.col-location .loc-select {
    width: 100%;
    height: 32px;
    border: 0 !important;                /* 彻底无框（避免 currentColor 继承 :invalid 的灰色） */
    border-radius: 0;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Ccircle cx='2.5' cy='4' r='1.3' fill='%239CA3AF'/%3E%3Ccircle cx='7' cy='4' r='1.3' fill='%239CA3AF'/%3E%3Ccircle cx='11.5' cy='4' r='1.3' fill='%239CA3AF'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    font-size: 13px;
    color: #111827;
    padding: 0 20px 0 6px;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}
.bill-grid td.col-location .loc-select:focus,
.bill-grid td.col-location .loc-select:hover {
    border: 0 !important;
    background-color: #F7FBF9;   /* 更浅的底色（用户反馈原 #F0FAF5 观感偏深） */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Ccircle cx='2.5' cy='4' r='1.3' fill='%230d9488'/%3E%3Ccircle cx='7' cy='4' r='1.3' fill='%230d9488'/%3E%3Ccircle cx='11.5' cy='4' r='1.3' fill='%230d9488'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
}
/* 未选择仓库时（value="" + required → :invalid）：显示浅灰"请选择"占位（与单据头一致） */
.bill-grid td.col-location .loc-select:invalid {
    color: #9ca3af;
}

/* 单据底部：备注 + 金额横排 + 制单人 */
.bill-foot { margin-top: 12px; border-top: 1px solid #EEF0F2; padding-top: 12px; }
.bill-foot .bf-note { margin-bottom: 10px; }
.bill-foot .bf-note textarea {
    width: 100%; height: 50px;
    border: 1px solid #E5E7EB; border-radius: 4px;
    padding: 6px 10px; font-size: 13px;
    resize: vertical;
}
/* 金额横排区：参考暮豆 con-footer ul li */
.bill-amount-area {
    list-style: none; padding: 0; margin: 0 0 12px 0;
    display: flex; flex-wrap: wrap; gap: 0;
}
.bill-amount-area li {
    display: flex; align-items: center;
    margin: 0 28px 8px 0;
    min-width: 180px;
}
.bill-amount-area li label {
    flex: 0 0 84px;
    font-size: 13px; color:#6B7280;
}
.bill-amount-area li .lus-input {
    flex: 1 1 auto; max-width: 140px;
    height: 28px; padding: 0 8px;
    border: 1px solid #E5E7EB; border-radius: 4px;
    font-size: 13px;
}
.bill-amount-area li .lus-input[readonly] {
    background: #F9FAFB; color: #374151;
}
.bill-amount-area li.highlight .lus-input {
    color: #C76E8A; font-weight: 600;
}
/* 制单人/审核人灰色区 */
.bill-meta {
    list-style: none; padding: 8px 0 0 0; margin: 0;
    border-top: 1px dashed #E5E7EB;
    display: flex; flex-wrap: wrap; align-items: center; gap: 0;
    color: #9CA3AF; font-size: 12px;
}
/* 含支付区（现金/微信等 pay-grid）的 bill-meta：虚线与首行（现金行）拉开距离，避免贴在一起；
   margin-bottom 同时把下方紧随的 bill-meta（收银员区）顶部虚线也推开，防止现金行下方贴线 */
.bill-meta:has(.pay-grid) { padding-top: 16px; margin-bottom: 12px; }
.bill-meta li {
    margin: 4px 24px 4px 0;
    display: flex; align-items: center;
    line-height: 28px;
}
.bill-meta li label { color: #9CA3AF; margin-right: 4px; }
.bill-meta li span { color: #6B7280; }
.bill-meta li .lus-input-inline { margin: 0; }
.bill-meta li .lus-input-inline .lus-input,
.bill-meta li .lus-input-inline .lus-cselect { height: 28px; line-height: 28px; }
.bill-meta li .lus-input-inline .lus-cselect dl { top: 30px; }
/* 制单人区业务员简洁下拉（管理员可见）— 与 span 文本视觉一致 */
.bill-meta li .meta-select {
    height: 28px; line-height: 28px;
    padding: 0 24px 0 8px;
    border: 1px solid #E5E7EB; border-radius: 4px;
    background: #fff; color: #6B7280; font-size: 12px;
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%239CA3AF' d='M5 6L0 0h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 8px center;
    cursor: pointer; outline: none;
}
.bill-meta li .meta-select:hover { border-color: #C76E8A; }


/* ================================================================
   [8] 弹窗-复合表单（data-layout="complex"）
   与 [6] 普通表单共享相同的表单布局规则，仅命名空间不同
   ================================================================ */
.in-modal-iframe form[data-layout="complex"], .in-modal-inline form[data-layout="complex"] {
    display: block;
    padding: 20px 24px;
    background: #fff;
    border: none;
    border-radius: 0;
}
/* complex 布局下的 .lus-inline（同组横排字段，如 BOM 成品商品/基准数量/单位）：
   必须是 flex 容器让 label/输入框/按钮同一行对齐；否则 label 走 lus-basic 的
   float 基础样式会与输入框重叠（实测 label.right > input.left）。 */
.in-modal-iframe form[data-layout="complex"] .lus-form-item .lus-inline,
.in-modal-inline form[data-layout="complex"] .lus-form-item .lus-inline {
    display: flex;
    align-items: center;
    margin-right: 16px;
    margin-bottom: 0;
}
.in-modal-iframe form[data-layout="complex"] .lus-form-item .lus-inline .lus-form-label,
.in-modal-inline form[data-layout="complex"] .lus-form-item .lus-inline .lus-form-label {
    flex: 0 0 auto;
    width: 100px;
    padding-right: 12px;
    text-align: right;
    box-sizing: border-box;
    float: none;
}
.in-modal-iframe form[data-layout="complex"] .lus-form-item .lus-inline .lus-input-inline,
.in-modal-inline form[data-layout="complex"] .lus-form-item .lus-inline .lus-input-inline {
    flex: 0 0 auto;
    margin-left: 0;
}
.in-modal-iframe form[data-layout="complex"] .lus-form-item .lus-inline .lus-btn,
.in-modal-inline form[data-layout="complex"] .lus-form-item .lus-inline .lus-btn {
    flex: 0 0 auto;
    margin-left: 8px;
}
.in-modal-iframe form[data-layout="complex"] .lus-form-item.full-row,
.in-modal-inline form[data-layout="complex"] .lus-form-item.full-row,
.in-modal-iframe form[data-layout="complex"] .lus-form-item[style*="display:none"], .in-modal-inline form[data-layout="complex"] .lus-form-item[style*="display:none"] {
    grid-column: 1 / -1;
}
/* complex 布局下 full-row 的输入容器也撑满整行（否则 SKU 矩阵/明细表格
   900px 溢出弹窗边框，右边被截断；overflow-x:auto 才能生效） */
.in-modal-iframe form[data-layout="complex"] .lus-form-item.full-row .lus-input-block,
.in-modal-inline form[data-layout="complex"] .lus-form-item.full-row .lus-input-block {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;   /* 允许收缩，表格在容器内横向滚动 */
}
.in-modal-iframe form[data-layout="complex"] .lus-form-item, .in-modal-inline form[data-layout="complex"] .lus-form-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
}
.in-modal-iframe form[data-layout="complex"] .lus-form-label, .in-modal-inline form[data-layout="complex"] .lus-form-label {
    flex: 0 0 auto;
    width: 100px;
    padding-right: 12px;
    text-align: right;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 32px;
    height: 32px;
}
.in-modal-iframe form[data-layout="complex"] .lus-input-block, .in-modal-inline form[data-layout="complex"] .lus-input-block {
    flex: 0 0 auto;
    margin-left: 0;
    min-height: auto;
}
.in-modal-iframe form[data-layout="complex"] .lus-input-block .lus-input,
.in-modal-inline form[data-layout="complex"] .lus-input-block .lus-input,
.in-modal-iframe form[data-layout="complex"] .lus-input-block select, .in-modal-inline form[data-layout="complex"] .lus-input-block select {
    width: 100%;
    max-width: 240px;
}
.in-modal-iframe form[data-layout="complex"] .lus-input-block input[type="number"], .in-modal-inline form[data-layout="complex"] .lus-input-block input[type="number"] {
    width: 100%;
    max-width: 160px;
}
.in-modal-iframe form[data-layout="complex"] .lus-input-block textarea, .in-modal-inline form[data-layout="complex"] .lus-input-block textarea {
    width: 100%;
    max-width: 480px;
    min-height: 80px;
}

/* ================================================================
   [9] 输入框尺寸系统 — 替代内联 style="width:xxxpx"
   用法：在 input/select/textarea 上加 class="input-sm/md/lg/xl/full"
   尺寸：sm=160px 短数字、md=240px 普通文本、lg=320px 长文本、xl=480px textarea、full=100%
   ================================================================ */
.in-modal-iframe .input-sm   { width: 240px !important; max-width: 240px !important; height: 32px !important; padding: 0 11px !important; font-size: 13px !important; }
.in-modal-iframe .input-md   { width: 240px !important; max-width: 240px !important; height: 32px !important; padding: 0 11px !important; font-size: 13px !important; }
.in-modal-iframe .input-lg   { width: 240px !important; max-width: 240px !important; height: 32px !important; padding: 0 11px !important; font-size: 13px !important; }
.in-modal-iframe .input-xl   { width: 240px !important; max-width: 240px !important; }
.in-modal-iframe .input-full { width: 100% !important; max-width: none !important; }
/* 弹窗内所有普通输入框统一 240px（含裸 class="lus-input" 无尺寸类的，
   与 input-sm/md/lg 一致；排除 input-full 撑满、排除明细表格内自适应列宽。
   注意：排除选择器不能用 id（会把整条规则特异性抬升，压过页面的 #singlePriceItem 等 id 规则） */
.in-modal-iframe .lus-form-item .lus-input:not(.input-full):not(.bill-grid .lus-input):not(.sku-matrix-wrap .lus-input),
.in-modal-inline .lus-form-item .lus-input:not(.input-full):not(.bill-grid .lus-input):not(.sku-matrix-wrap .lus-input),
.in-modal-iframe .form-item-control .lus-input:not(.input-full),
.in-modal-inline .form-item-control .lus-input:not(.input-full) {
    width: 240px !important;
    max-width: 240px !important;
    flex-shrink: 0;   /* 防 flex 容器压缩（如品牌 Logo 上传框 input+按钮并排） */
}
/* 明细表格内输入框保持 100% 自适应（bill-grid / SKU 矩阵列宽） */
.in-modal-iframe .bill-grid .lus-input,
.in-modal-inline .bill-grid .lus-input,
.in-modal-iframe .sku-matrix-wrap .lus-input,
.in-modal-inline .sku-matrix-wrap .lus-input,
.in-modal-iframe #detailTbody .lus-input,
.in-modal-inline #detailTbody .lus-input {
    width: 100% !important;
    max-width: 100% !important;
}
/* textarea 尺寸 */
.in-modal-iframe textarea.input-sm  { width: 240px !important; max-width: 240px !important; min-height: 60px; }
.in-modal-iframe textarea.input-md  { width: 240px !important; max-width: 240px !important; min-height: 60px; }
.in-modal-iframe textarea.input-lg  { width: 240px !important; max-width: 240px !important; min-height: 80px; }
.in-modal-iframe textarea.input-xl  { width: 240px !important; max-width: 240px !important; min-height: 80px; }

/* 弹窗内下拉统一宽度 240px（与输入框一致，保证表单整齐规范） */
.in-modal-iframe .lus-form-item .lus-input-block .lus-cselect,
.in-modal-inline .lus-form-item .lus-input-block .lus-cselect,
.in-modal-iframe .lus-form-item .lus-input-block .lus-cselect .lus-input, .in-modal-inline .lus-form-item .lus-input-block .lus-cselect .lus-input {
    width: 240px !important;
    max-width: 240px !important;
    height: 32px !important;
}
.in-modal-iframe .lus-form-item .lus-input-block .lus-cselect .lus-cselect-trigger,
.in-modal-inline .lus-form-item .lus-input-block .lus-cselect .lus-cselect-trigger {
    height: 32px !important;
    line-height: 32px !important;
}
.in-modal-iframe .lus-form-item .lus-input-block .lus-ms,
.in-modal-inline .lus-form-item .lus-input-block .lus-ms { width: 240px !important; max-width: 240px !important; }
.in-modal-iframe .lus-form-item .lus-input-block .lus-ms .lus-ms-trigger,
.in-modal-inline .lus-form-item .lus-input-block .lus-ms .lus-ms-trigger { height: 32px !important; box-sizing: border-box; }
.in-modal-iframe .lus-form-item .lus-input-block select.input-sm + .lus-cselect,
.in-modal-inline .lus-form-item .lus-input-block select.input-sm + .lus-cselect,
.in-modal-iframe .lus-form-item .lus-input-block select.input-sm + .lus-cselect .lus-input, .in-modal-inline .lus-form-item .lus-input-block select.input-sm + .lus-cselect .lus-input,
.in-modal-iframe .lus-form-item .lus-input-block select.input-md + .lus-cselect,
.in-modal-inline .lus-form-item .lus-input-block select.input-md + .lus-cselect,
.in-modal-iframe .lus-form-item .lus-input-block select.input-md + .lus-cselect .lus-input, .in-modal-inline .lus-form-item .lus-input-block select.input-md + .lus-cselect .lus-input,
.in-modal-iframe .lus-form-item .lus-input-block select.input-lg + .lus-cselect,
.in-modal-inline .lus-form-item .lus-input-block select.input-lg + .lus-cselect,
.in-modal-iframe .lus-form-item .lus-input-block select.input-lg + .lus-cselect .lus-input, .in-modal-inline .lus-form-item .lus-input-block select.input-lg + .lus-cselect .lus-input,
.in-modal-iframe .lus-form-item .lus-input-block select.input-xl + .lus-cselect,
.in-modal-inline .lus-form-item .lus-input-block select.input-xl + .lus-cselect,
.in-modal-iframe .lus-form-item .lus-input-block select.input-xl + .lus-cselect .lus-input, .in-modal-inline .lus-form-item .lus-input-block select.input-xl + .lus-cselect .lus-input {
    width: 240px !important;
    max-width: 240px !important;
}
/* 下拉面板宽度跟随（统一 240px） */
.in-modal-iframe .lus-form-item .lus-input-block select + .lus-cselect dl { min-width: 240px; }
.in-modal-iframe .lus-form-item .lus-input-block select.input-full + .lus-cselect,
.in-modal-inline .lus-form-item .lus-input-block select.input-full + .lus-cselect,
.in-modal-iframe .lus-form-item .lus-input-block select.input-full + .lus-cselect .lus-input, .in-modal-inline .lus-form-item .lus-input-block select.input-full + .lus-cselect .lus-input {
    width: 100% !important;
    max-width: none !important;
}

/* --- 列表页搜索区 --- */
.plat-search-bar {
    background: #fafbfc;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-xs, 0 1px 2px rgba(0,0,0,0.03));
}
/* 搜索栏内的 form 才是真正的 flex 容器，确保 input/select/button 横向排列 */
.plat-search-bar .lus-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.plat-search-bar .lus-input {
    height: 34px;
    line-height: 34px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    width: auto;
    min-width: 0;
    max-width: 260px;
}
.plat-search-bar .lus-input:focus { border-color: var(--primary-color); }
.plat-search-bar .lus-cselect .lus-input,
.plat-search-bar .lus-form-select .lus-input { min-width: 100px; }
.plat-search-bar .lus-btn {
    height: 34px;
    line-height: 34px;
    padding: 0 14px;
    font-size: 13px;
    border-radius: 6px;
}
/* 操作按钮组：靠右排列（对齐参考 UI .toolbar 右侧的新增/导入/导出/列设置/刷新） */
.plat-search-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
/* 无 form 的搜索栏（纯文本 + 按钮，如到期提醒页）也走 flex 布局 */
.plat-search-bar:not(:has(.lus-form)) {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* 按钮组内按钮恢复组内边框/圆角（存量页面 lus-btn-group 使用） */
.plat-search-bar .lus-btn-group {
    align-self: center;
    height: 34px;
    line-height: 34px;
    margin-top: 0;
}
.plat-search-bar .lus-btn-group .lus-btn {
    height: 34px;
    line-height: 34px;
    border-radius: 0;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0 !important;
}
.plat-search-bar .lus-btn-group .lus-btn:first-child {
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
    border-left: 1px solid var(--border-color, #d9d9d9);
}
.plat-search-bar .lus-btn-group .lus-btn:last-child {
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}
.plat-search-bar .lus-btn-group .lus-btn + .lus-btn {
    border-left: 1px solid var(--border-color, #d9d9d9);
    margin-left: -1px;
}

/* 视图切换 Tab（对齐底层框架发票页 .inv-tab 风格）：白底描边 + 激活浅色底 */
.view-tab {
    height: 32px;
    line-height: 32px;
    padding: 0 14px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    background: #fff;
    transition: all 0.15s;
    margin-left: 0;
    box-sizing: border-box;
}
.view-tab:hover { color: var(--menu-accent); background: var(--bg-soft); }
.view-tab.active {
    color: var(--menu-accent);
    background: var(--primary-softer);
    border-color: transparent;
    font-weight: 500;
}
.plat-search-bar .view-tab { height: 32px; line-height: 32px; }
/* 与 lus-btn-group 搭配时保持独立圆角 */
.plat-search-bar .lus-btn-group .view-tab { border-radius: 6px; margin-left: 0; border: 1px solid var(--border-light); }

/* ============================================================
   列表页统一为参考 UI 商品列表的 table-card 风格：
   搜索栏 + 表格卡片合成一张卡片，卡片内表格滚动、分页钉底
   ============================================================ */
.page-container:has(.plat-search-bar) {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 3px;
    overflow: hidden;
}
.page-container:has(.plat-search-bar) .plat-search-bar {
    flex-shrink: 0;
    margin-bottom: 0;
    border-radius: 8px 8px 0 0;
    border-bottom: 1px solid var(--border-light); /* 工具栏分隔线（对齐参考 toolbar） */
    border-top: 1px solid var(--border-light);
    border-left: 1px solid var(--border-light);
    border-right: 1px solid var(--border-light);
    padding: 9px 10px;
    box-shadow: none;
}
.page-container:has(.plat-search-bar) > .content-card {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 0 0 8px 8px;
    border-top: none;
    margin-bottom: 0;
}
.page-container:has(.plat-search-bar) .lus-grid-wrap {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.page-container:has(.plat-search-bar) .lus-grid-scroll {
    flex: 1;
    min-height: 0;
    overflow: auto;
}
/* 存量 .lus-table 列表页（如组织架构树）：卡片内表格铺满、超出滚动，分页钉底，对齐参考 table-card */
.page-container:has(.plat-search-bar) > .content-card:has(> .lus-table, > .lus-table-scroll) {
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.page-container:has(.plat-search-bar) > .content-card > .lus-table,
.page-container:has(.plat-search-bar) > .content-card > .lus-table-scroll {
    flex: 1;
    min-height: 0;
    overflow: auto;
    width: 100%;
}
.page-container:has(.plat-search-bar) > .content-card > .lus-table {
    border: none;
    margin: 0;
}
/* 树形/静态表格滚动容器内的分页条：钉底 + 顶部分隔线（对齐参考 .pager） */
.page-container:has(.plat-search-bar) > .content-card > .lus-pager {
    flex-shrink: 0;
    border-top: 1px solid var(--border-light);
}

/* 配置/表单页（含底部操作栏）：内容距容器四周 3px，对齐列表页（开票资料/公司信息等） */
.page-container:has(.modal-footer) {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 3px; /* 对齐列表页：内容距容器四周 3px（用户要求） */
}
.page-container:has(.modal-footer) > .content-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 0; /* 清除卡片默认 16px 下边距，底部仅剩容器 3px 内边距 */
    padding: 0; /* footer 通栏对齐卡片边缘（参考列表页分页栏），标题/表单自带内边距 */
}
.page-container:has(.modal-footer) > .content-card > .card-header {
    padding: 16px 20px 12px;
    margin-bottom: 0;
}
.page-container:has(.modal-footer) > .content-card > .card-body,
.page-container:has(.modal-footer) > .content-card > .lus-form,
.page-container:has(.modal-footer) > .content-card > form {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* --- Layui 表格覆盖 — 对齐参考 UI（白底浅灰表头、紧凑内边距） --- */
.lus-table { margin: 0; width: 100%; border-collapse: collapse; }
.lus-table thead tr,
.lus-table-header,
.lus-table-tool {
    background-color: #F7F8FA !important;
}
.lus-table thead th,
.lus-table-header th {
    background-color: #F7F8FA !important;
    color: #4B5563 !important;
    font-weight: 500 !important;
    font-size: 13px !important;
    border-bottom: 1px solid #EEF0F3 !important;
}
.lus-table td {
    padding: 6px 10px !important;
    border-bottom: 1px solid #EEF0F3 !important;
    border-right: 1px solid #EEF0F3 !important;
    color: #1F2937 !important;
    font-size: 13px !important;
    text-align: center !important;
    vertical-align: middle !important;
}
.lus-table th {
    padding: 6px 10px !important;
    border-right: 1px solid #EEF0F3 !important;
    text-align: center !important;
    vertical-align: middle !important;
}
.lus-table-hover,
.lus-table-click,
.lus-table[ls-even] tr:nth-child(even) {
    background-color: #FAFBFC !important;
}
.lus-table-hover {
    background-color: #F0FAF5 !important;
}
.lus-table-page {
    border-top: 1px solid #EEF0F3;
    padding: 7px 10px;
}
.lus-table-page .lus-laypage a,
.lus-table-page .lus-laypage span {
    border-radius: 6px;
    border-color: #E5E7EB;
    color: #4B5563;
    font-size: 13px;
}

/* ============================================================
   响应式适配 — 不同电脑分辨率自适应
   关键断点：
   - 1440×900  大屏笔记本（侧栏稍窄，padding 稍紧）
   - 1366×768  常见笔记本（最常见低分辨率，必须可读可用）
   - 1280×720  入门级笔记本
   - 1024×768  平板/老电脑（侧栏自动折叠，单列布局）
   - 800px     极小窗口（保证不溢出）
   设计原则：保持核心功能可用，不强制缩小到无法点击；
            弹窗、表单、表格优先滚动而非压缩；
            侧栏在窄屏自动折叠为图标模式。
   注意：纯净版默认 --side-width: 200px，以下断点仅在窄屏时收窄
   ============================================================ */

/* 1440px 及以下：紧凑布局 */
@media (max-width: 1440px) {
    :root {
        --side-width: 200px;       /* 侧栏保持 200px，仅压缩内容与菜单内边距 */
        --header-height: 52px;     /* header 稍微压低 */
        --footer-height: 36px;
    }
    .page-container { padding: 3px; }
    .content-card .card-header { padding: 10px 14px; }
    .content-card .card-body { padding: 12px 14px; }
    /* 菜单项：压缩 margin 和 padding，给文字和箭头更多空间 */
    .lus-nav-tree .lus-nav-item { margin: 2px 4px; }
    .lus-nav-tree .lus-nav-item a { padding: 0 24px 0 12px; font-size: 15px; }
    .lus-nav-tree .lus-nav-child dd a { padding-left: 38px; }
    .lus-nav-tree .lus-nav-child dd.has-sub .sub-nav dd a { padding-left: 42px; }
}

/* 1366px 专属断点：最常见低分辨率笔记本，进一步压缩 */
@media (max-width: 1366px) {
    :root {
        --side-width: 170px;
        --header-height: 48px;
        --footer-height: 36px;
    }
    .page-container { padding: 3px; }
    .content-card .card-header { padding: 8px 12px; }
    .content-card .card-title { font-size: 13px; }
    .content-card .card-body { padding: 10px 12px; }
    /* Tab 栏压缩（弥补未变量化的缺陷） */
    .ls-tabs-header { height: 36px; }
    .ls-tabs-list { height: 36px; }
    .ls-tab { height: 36px; line-height: 36px; font-size: 12.5px; padding: 0 12px; }
    /* 菜单进一步紧凑 */
    .lus-nav-tree .lus-nav-item { margin: 1px 2px; }
    .lus-nav-tree .lus-nav-item a { padding: 0 22px 0 10px; font-size: 12.5px; height: 38px; line-height: 38px; }
    .lus-nav-tree .lus-nav-item a i { margin-right: 6px; font-size: 17px; }
    .lus-nav-tree .lus-nav-item a .lus-ic { width: 17px; height: 17px; }
    /* 弹窗内表单控件缩窄 */
    .in-modal-iframe .content-card > form,
    .in-modal-inline .content-card > form,
    .in-modal-iframe .content-card > .saas-modal-form { padding: 14px 18px; }
    .in-modal-iframe .content-card .card-header { padding: 10px 16px; }
    .in-modal-iframe form[data-layout="form"] .lus-form-label,
    .in-modal-inline form[data-layout="form"] .lus-form-label,
    .in-modal-iframe form[data-layout="complex"] .lus-form-label { width: 88px; padding-right: 8px; }
    .in-modal-iframe form[data-layout="form"] .lus-input-block .lus-input,
    .in-modal-inline form[data-layout="form"] .lus-input-block .lus-input,
    .in-modal-iframe form[data-layout="form"] .lus-input-block select,
    .in-modal-inline form[data-layout="form"] .lus-input-block select,
    .in-modal-iframe form[data-layout="complex"] .lus-input-block .lus-input,
    .in-modal-inline form[data-layout="complex"] .lus-input-block .lus-input,
    .in-modal-iframe form[data-layout="complex"] .lus-input-block select { max-width: 200px; }
    .in-modal-iframe form[data-layout="form"] .lus-input-block input[type="number"],
    .in-modal-inline form[data-layout="form"] .lus-input-block input[type="number"],
    .in-modal-iframe form[data-layout="complex"] .lus-input-block input[type="number"] { max-width: 130px; }
    .in-modal-iframe form[data-layout="form"] .lus-input-block textarea,
    .in-modal-inline form[data-layout="form"] .lus-input-block textarea,
    .in-modal-iframe form[data-layout="complex"] .lus-input-block textarea { max-width: 400px; }
    .in-modal-iframe .modal-footer { height: 44px; padding: 6px 16px; }
    /* 表格分页栏压缩 */
    .lus-table-page { padding: 6px 10px; }
    .lus-table-page .lus-laypage a, .lus-table-page .lus-laypage span { padding: 0 8px; height: 24px; line-height: 24px; }
    /* modal-footer 压缩 */
    .modal-footer { height: 44px; padding: 6px 16px; }
}

/* 1280px 及以下：进一步紧凑 + 三级菜单缩进收窄 */
@media (max-width: 1280px) {
    :root { --side-width: 160px; }
    /* 菜单进一步压缩 */
    .lus-nav-tree .lus-nav-item { margin: 1px 2px; }
    .lus-nav-tree .lus-nav-item a { padding: 0 22px 0 10px; font-size: 12.5px; }
    .lus-nav-tree .lus-nav-item a i { margin-right: 6px; font-size: 17px; }
    .lus-nav-tree .lus-nav-item a .lus-ic { width: 17px; height: 17px; }
    .lus-nav-tree .lus-nav-child dd a { padding-left: 34px; font-size: 12.5px; }
    .lus-nav-tree .lus-nav-child dd.has-sub .sub-nav dd a { padding-left: 36px; }
}

/* 对齐平台端：窗口缩小【不自动折叠】侧边栏（平台端无此媒体查询，不存在自动/手动不一致与位置残留），
   窄屏仅限制最小宽度防溢出；折叠由用户点击"侧边伸缩"触发（body.side-spread，60px） */
@media (max-width: 1024px) {
    body { min-width: 768px; }
}

/* 800px 以下：极小窗口（很少见，但保证不溢出；不折叠侧边栏，与平台端一致） */
@media (max-width: 800px) {
    :root { --header-height: 48px; --footer-height: 36px; }
    .page-container { padding: 3px; }
    .content-card .card-header { padding: 8px 10px; }
    .content-card .card-title { font-size: 13px; }
    /* 顶栏空间不足：隐藏版本/续费等次要项（lus-hide-xs 本意即窄屏隐藏），
       避免右侧内容换行溢出顶栏、浮动到选项卡上方 */
    .lus-hide-xs { display: none !important; }
}

/* 低高度屏幕（800px 高度以下）：压缩 header/tab/footer，给主内容更多空间 */
@media (max-height: 800px) {
    :root { --header-height: 50px; --footer-height: 38px; }
    .page-container { padding: 3px; }
}

@media (max-width: 1440px) {
    :root {
        --side-width: 200px;       /* 侧栏保持 200px，仅压缩内容与菜单内边距 */
        --header-height: 52px;     /* header 稍微压低 */
        --footer-height: 36px;
    }
    .page-container { padding: 3px; }
    .content-card .card-header { padding: 10px 14px; }
    .content-card .card-body { padding: 12px 14px; }
    /* 菜单项：压缩 margin 和 padding，给文字和箭头更多空间 */
    .lus-nav-tree .lus-nav-item { margin: 2px 4px; }
    .lus-nav-tree .lus-nav-item a { padding: 0 24px 0 12px; font-size: 15px; }
    .lus-nav-tree .lus-nav-child dd a { padding-left: 38px; }
    .lus-nav-tree .lus-nav-child dd.has-sub .sub-nav dd a { padding-left: 42px; }
    /* 单据头：grid 布局下仅微调内边距与标签宽度 */
    .bill-head .bh-cell { padding: 3px 0; }
    .bill-head .bh-cell .bh-label { flex: 0 0 auto; min-width: 72px; font-size: 13px; text-align: right; overflow: hidden; text-overflow: ellipsis; }
    .bill-grid .lus-table thead th { height: 36px; font-size: 12px; padding: 0 4px; }
    .bill-grid .lus-table tbody td { padding: 0 4px; height: 36px; }
    .bill-grid .lus-input { height: 30px; font-size: 12px; }
    .bill-amount-area li { min-width: 150px; margin-right: 16px; }
    .bill-amount-area li label { flex: 0 0 70px; }
    .bill-meta li { margin-right: 16px; }
}

@media (max-height: 700px) {
    :root { --header-height: 46px; --footer-height: 34px; }
    .page-container { padding: 3px; }
    .content-card .card-header { padding: 8px 12px; }
}

/* ============================================================
   列表页操作列：对齐参考 UI 文本链接风格（teal=编辑 / amber=状态 / danger=删除 + | 分隔）
   覆盖 .lus-table 表格（lus-grid 已由 lus-compat 处理，这里补齐普通表格）
   ============================================================ */
.lus-table td .lus-btn.lus-btn-xs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: auto;
    padding: 2px 6px;
    font-size: 13px;
    line-height: 1.6;
    border: none;
    background: transparent;
    color: var(--primary-color);
    border-radius: 4px;
    box-shadow: none;
}
.lus-table td .lus-btn.lus-btn-xs:hover { background: var(--primary-softer); color: var(--primary-color); }
.lus-table td .lus-btn.lus-btn-xs.lus-btn-warm { color: #b45309; }
.lus-table td .lus-btn.lus-btn-xs.lus-btn-warm:hover { background: rgba(217,119,6,.12); color: #b45309; }
.lus-table td .lus-btn.lus-btn-xs.lus-btn-danger { color: var(--danger, #ef4444); }
.lus-table td .lus-btn.lus-btn-xs.lus-btn-danger:hover { background: rgba(239,68,68,.08); color: var(--danger, #ef4444); }
.lus-table td .lus-btn.lus-btn-xs.lus-btn-normal { color: var(--text-muted, #9ca3af); }
.lus-table td .lus-btn.lus-btn-xs.lus-btn-normal:hover { color: var(--primary-color); background: var(--primary-softer); }
/* 打印类=蓝（与状态徽章 lus-bg-blue 同色） */
.lus-table td .lus-btn.lus-btn-xs.lus-btn-primary { color: #1d5fd6; }
.lus-table td .lus-btn.lus-btn-xs.lus-btn-primary:hover { background: rgba(29,95,214,.08); color: #1d5fd6; }
/* 入库/出库/审核等正向业务动作=绿（与状态徽章 lus-bg-green 同色） */
.lus-table td .lus-btn.lus-btn-xs.lus-btn-success { color: #0a8f4e; }
.lus-table td .lus-btn.lus-btn-xs.lus-btn-success:hover { background: rgba(10,143,78,.08); color: #0a8f4e; }
.lus-table td .lus-btn.lus-btn-xs + .lus-btn.lus-btn-xs::before {
    content: "|";
    margin-right: 6px;
    color: var(--border-light, #eef0f3);
    font-size: 12px;
}

/* ============================================================
   表格状态徽章 pill 化：对齐参考 UI（浅底圆点胶囊，非实心块）
   ============================================================ */
/* 表格状态 pill 化（对齐参考 UI；覆盖 lus-grid 与 lus-table 两种表格） */
.lus-grid td .lus-badge, .lus-table td .lus-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 18px;
    font-weight: 400;
}
.lus-grid td .lus-badge::before, .lus-table td .lus-badge::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}
.lus-grid td .lus-badge.lus-bg-green, .lus-table td .lus-badge.lus-bg-green { background: #e6f7ee; color: #0a8f4e; }
.lus-grid td .lus-badge.lus-bg-gray,  .lus-table td .lus-badge.lus-bg-gray  { background: #f0f1f3; color: #666f7d; }
.lus-grid td .lus-badge.lus-bg-orange, .lus-table td .lus-badge.lus-bg-orange { background: #fff7e6; color: #b45309; }
.lus-grid td .lus-badge.lus-bg-blue, .lus-table td .lus-badge.lus-bg-blue { background: #e8f1fe; color: #1d5fd6; }
/* 第一百三十一轮 UI 体检补录：cyan/yellow/purple/warm 全项目有引用但此前未定义（会被 :not() 兜底成浅灰，状态分不清） */
.lus-grid td .lus-badge.lus-bg-cyan, .lus-table td .lus-badge.lus-bg-cyan { background: #e0f7fa; color: #0e7490; }
.lus-grid td .lus-badge.lus-bg-yellow, .lus-table td .lus-badge.lus-bg-yellow { background: #fefce8; color: #a16207; }
.lus-grid td .lus-badge.lus-bg-purple, .lus-table td .lus-badge.lus-bg-purple { background: #f3e8ff; color: #7e22ce; }
.lus-grid td .lus-badge.lus-bg-warm, .lus-table td .lus-badge.lus-bg-warm { background: #ffedd5; color: #c2410c; }
.lus-grid td .lus-badge.lus-bg-red,
.lus-grid td .lus-badge.lus-bg-danger,
.lus-table td .lus-badge.lus-bg-red,
.lus-table td .lus-badge.lus-bg-danger { background: #fdecec; color: #e5484d; }
/* 无颜色类的状态 pill 默认浅灰（对齐参考 pill-gray，避免 lus-compat 深灰实心底） */
.lus-grid td .lus-badge:not(.lus-bg-green):not(.lus-bg-orange):not(.lus-bg-gray):not(.lus-bg-red):not(.lus-bg-danger):not(.lus-bg-blue),
.lus-table td .lus-badge:not(.lus-bg-green):not(.lus-bg-orange):not(.lus-bg-gray):not(.lus-bg-red):not(.lus-bg-danger):not(.lus-bg-blue) {
    background: #f0f1f3;
    color: #666f7d;
}

/* ============================================================
   列表页操作列：对齐参考 UI 文本链接风格 + 3 色区分（teal=详情/主操作 / 中性灰=编辑 / amber=停用启用 / danger=删除）
   覆盖 lus-grid 与 lus-table 两种表格
   !important 压过全局按钮主色规则
   ============================================================ */
.lus-grid td .lus-btn.lus-btn-xs, .lus-table td .lus-btn.lus-btn-xs {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px;
    height: auto !important;
    padding: 2px 6px !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
    border: none !important;
    background: transparent !important;
    color: var(--text-2, #646a73) !important; /* 默认：中性深灰（编辑等常规操作） */
    border-radius: 4px !important;
    box-shadow: none !important;
}
.lus-grid td .lus-btn.lus-btn-xs:hover, .lus-table td .lus-btn.lus-btn-xs:hover { background: var(--bg-hover, #f5f6fa) !important; color: var(--text-2, #646a73) !important; }
/* 详情/查看类=teal 主色 */
.lus-grid td .lus-btn.lus-btn-xs.primary, .lus-table td .lus-btn.lus-btn-xs.primary { color: #0d9488 !important; background: transparent !important; }
.lus-grid td .lus-btn.lus-btn-xs.primary:hover, .lus-table td .lus-btn.lus-btn-xs.primary:hover { background: rgba(13,148,136,.08) !important; color: #0f766e !important; }
/* 状态类=amber（停用/启用） */
.lus-grid td .lus-btn.lus-btn-xs.lus-btn-warm, .lus-table td .lus-btn.lus-btn-xs.lus-btn-warm { color: #b45309 !important; background: transparent !important; }
.lus-grid td .lus-btn.lus-btn-xs.lus-btn-warm:hover, .lus-table td .lus-btn.lus-btn-xs.lus-btn-warm:hover { background: rgba(217,119,6,.12) !important; color: #b45309 !important; }
/* 危险类=红（删除） */
.lus-grid td .lus-btn.lus-btn-xs.lus-btn-danger, .lus-table td .lus-btn.lus-btn-xs.lus-btn-danger { color: var(--danger, #ef4444) !important; background: transparent !important; }
.lus-grid td .lus-btn.lus-btn-xs.lus-btn-danger:hover, .lus-table td .lus-btn.lus-btn-xs.lus-btn-danger:hover { background: rgba(239,68,68,.08) !important; color: var(--danger, #ef4444) !important; }
/* 次要类=浅灰 */
.lus-grid td .lus-btn.lus-btn-xs.lus-btn-normal, .lus-table td .lus-btn.lus-btn-xs.lus-btn-normal { color: var(--text-muted, #9ca3af) !important; background: transparent !important; }
.lus-grid td .lus-btn.lus-btn-xs.lus-btn-normal:hover, .lus-table td .lus-btn.lus-btn-xs.lus-btn-normal:hover { color: #0d9488 !important; background: rgba(13,148,136,.08) !important; }
/* 打印类=蓝（打印/预览；与状态徽章 lus-bg-blue 同色） */
.lus-grid td .lus-btn.lus-btn-xs.lus-btn-primary, .lus-table td .lus-btn.lus-btn-xs.lus-btn-primary { color: #1d5fd6 !important; background: transparent !important; }
.lus-grid td .lus-btn.lus-btn-xs.lus-btn-primary:hover, .lus-table td .lus-btn.lus-btn-xs.lus-btn-primary:hover { background: rgba(29,95,214,.08) !important; color: #1d5fd6 !important; }
/* 入库/出库/审核/退货等正向业务动作=绿（与状态徽章 lus-bg-green 同色） */
.lus-grid td .lus-btn.lus-btn-xs.lus-btn-success, .lus-table td .lus-btn.lus-btn-xs.lus-btn-success { color: #0a8f4e !important; background: transparent !important; }
.lus-grid td .lus-btn.lus-btn-xs.lus-btn-success:hover, .lus-table td .lus-btn.lus-btn-xs.lus-btn-success:hover { background: rgba(10,143,78,.08) !important; color: #0a8f4e !important; }
/* 操作列竖线分隔 */
.lus-grid td .lus-btn.lus-btn-xs + .lus-btn.lus-btn-xs::before,
.lus-table td .lus-btn.lus-btn-xs + .lus-btn.lus-btn-xs::before {
    content: "|";
    margin-right: 6px;
    color: var(--border-light, #eef0f3) !important;
    font-size: 12px;
}

/* ============================================================
   全局滚动条：淡色细条，替代浏览器默认深灰滚动条（登录日志等列表页）
   已有更具体的滚动条规则（侧栏/弹窗 form 等）优先级更高，不受影响
   ============================================================ */
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
    background: #d9dee4;
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background: #c5cdd6; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-corner { background: transparent; }

/* ================================================================
   套餐升级弹窗（租户端抽屉内渲染；样式需在父文档生效，勿放回 iframe 页面）
   对齐底层架构：父文档加载本文件，抽屉内 #upgradeModal 内容才有样式
   ================================================================ */
.pk-modal-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 24px 28px;
}
/* 升级弹窗：上部内容滚动，合计/确认支付行固定抽屉底部 */
.pk-modal-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    margin-right: -6px;         /* 抵消滚动条占位，内容不左右晃动 */
    padding-right: 6px;
}
.pk-modal-body .pk-modal-row { margin-bottom: 18px; }
.pk-modal-body .pk-modal-label {
    font-size: 13px;
    color: #6B7785;
    margin-bottom: 8px;
}
.pk-months-group { display: flex; gap: 10px; flex-wrap: wrap; }
.pk-month-item {
    min-width: 72px;
    text-align: center;
    padding: 9px 14px;
    border: 1px solid var(--border-color, #E4E9ED);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    color: #6B7785;
    background: #fff;
    line-height: 1.4;
    box-sizing: border-box;
}
.pk-month-item:hover { border-color: var(--celadon-400); color: var(--celadon-600); }
.pk-month-item.active {
    border-color: var(--primary-color, #0d9488);
    background: var(--primary-softer, #F0F7F5);
    color: var(--celadon-600);
    font-weight: 600;
}
.pk-pay-group { display: flex; gap: 12px; flex-wrap: wrap; }
.pk-pay-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid var(--border-color, #E4E9ED);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: #6B7785;
    background: #fff;
    line-height: 1.4;
}
.pk-pay-item:hover { border-color: var(--celadon-400); color: var(--celadon-600); }
.pk-pay-item.active {
    border-color: var(--primary-color, #0d9488);
    background: var(--primary-softer, #F0F7F5);
    color: var(--celadon-600);
    font-weight: 600;
}
.pk-bank-box {
    margin-top: 12px;
    padding: 14px 16px;
    background: #F5F7F6;
    border-radius: 8px;
    border: 1px solid var(--border-light, #E4E9ED);
}
.pk-bank-box .pk-bank-title {
    font-size: 13px;
    font-weight: 600;
    color: #2C3338;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.pk-copy-btn {
    font-size: 12px;
    font-weight: 400;
    color: var(--celadon-600, #1B8A9B);
    background: #fff;
    border: 1px solid var(--celadon-400, #5BAEBE);
    padding: 3px 12px;
    border-radius: 4px;
    cursor: pointer;
    line-height: 1.4;
    transition: all 0.2s;
}
.pk-copy-btn:hover { background: var(--primary-softer, #E8F6F8); border-color: var(--celadon-500, #2E9BAB); }
.pk-copy-btn i { margin-right: 2px; font-size: 12px; }
.pk-bank-tip {
    margin-top: 12px;
    padding: 10px 14px;
    background: #FFF7E6;
    border: 1px solid #FFD591;
    border-radius: 6px;
    color: #8C6A1C;
    font-size: 13px;
    line-height: 1.6;
}
.pk-bank-tip i { margin-right: 4px; color: #FAAD14; }
/* 扫码付款渠道选择（套餐升级弹窗） */
.pk-qrcode-channels { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.pk-qrcode-item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px;
  border: 1px solid #E4E9ED; border-radius: 8px;
  cursor: pointer; font-size: 14px; color: #2C3338;
  transition: all 0.15s; background: #fff;
}
.pk-qrcode-item:hover { border-color: var(--celadon-500, #2BA0A8); }
.pk-qrcode-item.active {
  border-color: var(--celadon-500, #2BA0A8);
  color: var(--celadon-600, #1E7E85);
  background: #EFF9F9;
  font-weight: 600;
}
.pk-qrcode-item i { font-size: 18px; }
/* 转账信息表单：flex 布局 + 输入框拉伸占满（对齐底层架构，避免输入框塌缩变窄） */
.pk-bank-box .lus-form-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    max-width: 480px;          /* 行内容不超过 480px，避免全宽页面下输入框过长 */
}
.pk-bank-box .lus-form-label {
    flex: 0 0 90px;
    width: 90px;
    padding: 0;
    text-align: left;
    justify-content: flex-start;
    line-height: 32px;
    height: 32px;
}
.pk-bank-box .lus-input-block {
    flex: 1;
    width: auto;
    min-width: 0;
    margin-left: 12px;
}
.pk-bank-box .lus-input {
    background: #fff;
    border: 1px solid var(--border-color, #E4E9ED);
    height: 32px;
    font-size: 13px;
    width: 100%;
}
.pk-modal-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;             /* 固定底部，不随内容滚动 */
    padding-top: 14px;
    border-top: 1px solid var(--border-light, #E4E9ED);
    margin-top: 14px;
}
.pk-modal-total .pk-total-price {
    font-size: 24px;
    color: var(--celadon-600);
    font-weight: 700;
}
.pk-modal-total .pk-total-price small {
    color: #9CA8B5;
    font-size: 13px;
    font-weight: 400;
    margin-left: 8px;
}

/* ================================================================
   [15] 财务报表样式层（统一报表设计）
   用法：页面外层 .fin-stmt-card 作为报表容器；表格用 .fin-stmt-table；
   .fin-stmt-title/.fin-stmt-sub 为标题与期间；.fin-stmt-note 为提示条；
   .fin-chart-card 为图表卡片；.fin-stmt-table 内 .row-total 合计行、
   .row-section 段首行、.row-sub 次级行。
   ================================================================ */
.fin-stmt-card {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 26px 30px 30px;
    width: 100%;
    max-width: none;
    margin: 0 0 16px;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.04);
}
.page-container > .fin-stmt-card:last-child,
.page-container > .fin-chart-card:last-child {
    margin-bottom: 0;
}
.fin-stmt-title {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 2px;
    line-height: 1.4;
}
.fin-stmt-title::after {
    content: "";
    display: block;
    width: 46px;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light, #5eead4));
    margin: 10px auto 0;
}
.fin-stmt-sub {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    margin: 8px 0 20px;
    letter-spacing: 0.5px;
}
.fin-stmt-sub b { color: var(--text-secondary); font-weight: 600; }
.fin-stmt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
}
.fin-stmt-table thead th {
    background: #F8FAFC;
    color: #475569;
    font-weight: 600;
    text-align: center;
    border-bottom: 1px solid #E2E8F0;
    padding: 10px 12px;
    white-space: nowrap;
}
.fin-stmt-table td {
    border-bottom: 1px solid #EEF2F6;
    padding: 9px 12px;
    text-align: center;
    color: #334155;
    font-variant-numeric: tabular-nums;
}
.fin-stmt-table tbody tr:last-child td { border-bottom: none; }
.fin-stmt-table td.c-name { text-align: center; }
.fin-stmt-table td.c-leaf { padding-left: 26px; color: #64748B; }
.fin-stmt-table tr:hover td { background: #FAFBFC; }
.fin-stmt-table .row-total td {
    font-weight: 700;
    color: var(--text-primary);
    background: #F8FAFC;
    border-top: 1px solid #E2E8F0;
}
.fin-stmt-table .row-total:hover td { background: #F8FAFC; }
.fin-stmt-table .row-section td {
    font-weight: 600;
    color: var(--text-primary);
    background: #FBFCFF;
}
.fin-stmt-table .row-section:hover td { background: #FBFCFF; }
.fin-stmt-table .row-sub td { color: #64748B; }
.fin-stmt-table .row-sub td.c-name { padding-left: 22px; }
.fin-stmt-table a {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}
.fin-stmt-table a:hover { color: var(--primary-dark, #0f766e); text-decoration: underline; }
/* 报表单元格状态：同比正负（中国惯例：升红跌绿）/ 平衡校验 */
.fin-stmt-table .c-up { color: #DC2626; font-weight: 600; }
.fin-stmt-table .c-down { color: #16A34A; font-weight: 600; }
.fin-stmt-table .c-flat { color: #9CA3AF; }
.fin-stmt-ok { color: #16A34A !important; font-weight: 600; }
.fin-stmt-err { color: #DC2626 !important; font-weight: 600; }
/* 报表尾部校验行 */
.fin-stmt-check {
    margin-top: 14px;
    padding: 9px 14px;
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    color: #15803D;
}
.fin-stmt-check.err {
    background: #FEF2F2;
    border-color: #FECACA;
    color: #B91C1C;
}
/* 报表顶部提示条 */
.fin-stmt-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
    color: #7C5A10;
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    margin-bottom: 14px;
}
.fin-stmt-note .lus-icon { margin-top: 1px; flex-shrink: 0; }
/* 报表图表卡片 */
.fin-chart-card {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.04);
}
.fin-chart-card .fc-title {
    display: flex;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.fin-chart-card .fc-title::before {
    content: "";
    width: 3px;
    height: 13px;
    border-radius: 2px;
    background: var(--primary-color);
    margin-right: 8px;
}
/* 报表滚动容器（报表过宽时横向滚动不破坏卡片） */
.fin-stmt-scroll { overflow-x: auto; }
/* 报表页面（利润表/资产负债表/现金流量表）：禁用列表页的
   .page-container:has(.plat-search-bar) overflow:hidden 合体规则（该规则设计给
   搜索栏+表格卡片列表页，报表页无内部滚动容器会被整页裁剪）→ 恢复整页纵向滚动 */
.page-container.rpt-page:has(.plat-search-bar) {
    height: auto;
    display: block;
    overflow-y: auto;
}

/* ===== 顶部 APP 下载二维码浮层（hover 立即显示 / 点击切换） ===== */
.ls-app-download { position: relative; }
.ls-app-download .ls-app-download-btn { display: flex; align-items: center; gap: 4px; }
.ls-app-qrcode-panel {
    display: none;
    position: absolute;
    top: 100%;
    right: -8px;
    margin-top: 4px;
    width: 210px;
    padding: 14px 14px 12px;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(16, 24, 40, 0.12);
    z-index: 999;
    text-align: center;
    box-sizing: border-box;
}
.ls-app-qrcode-panel.show { display: block; }
.ls-app-qrcode-panel::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 28px;
    width: 10px;
    height: 10px;
    background: #fff;
    border-left: 1px solid #E5E7EB;
    border-top: 1px solid #E5E7EB;
    transform: rotate(45deg);
}
.ls-app-qrcode-box {
    width: 168px;
    height: 168px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}
.ls-app-qrcode-box img.ls-app-qrcode-img { width: 168px; height: 168px; object-fit: contain; }
.ls-app-qrcode-box canvas { display: block; }
.ls-app-qrcode-tip { margin-top: 2px; font-size: 13px; font-weight: 600; color: #1F2937; }
/* 覆盖框架两处高权重规则：.lus-nav .lus-nav-item a(21) 与
   .lus-layout-admin .lus-header .lus-nav .lus-nav-item a(41, display:flex + padding:0 16px + line-height:46px)。
   必须用同前缀完整选择器(51) 才能全部赢回：inline-block 小巧居中、文字居中、矮按钮 */
.lus-layout-admin .lus-header .lus-nav .lus-nav-item a.ls-app-qrcode-link {
    display: inline-block;
    height: auto;
    line-height: 1.4;
    padding: 2px 12px;
    margin-top: 4px;
    font-size: 12px;
    color: var(--primary-color, #0d9488);
    background: #F3F4F6;
    border-radius: 5px;
    text-decoration: none;
    text-align: center;
}
.lus-layout-admin .lus-header .lus-nav .lus-nav-item a.ls-app-qrcode-link:hover {
    background: #E5E7EB;
    color: var(--primary-color, #0d9488);
}
