body { background: #f2f2f2; }
.layui-card { margin-bottom: 20px; }

/* ===== 列表页：铺满屏幕 ===== */
/* overflow-y: scroll 常驻滚动条槽：内容一旦超过一屏出现纵向滚动条，
   内容区会被压窄约 17px，而 layui 表格是按出现前的宽度渲染的，
   最右侧固定列（金额/操作）就会被切出屏幕、整表冒出横向滚动条。 */
.layui-body { right: 0 !important; overflow-x: hidden; overflow-y: scroll; }
.layui-card, .layui-card-body { width: 100%; box-sizing: border-box; }
.layui-table-view { width: 100% !important; }

/**
 * 操作列按钮组：用 flex + gap 控制间距，
 * 避免模板里 <a> 之间的换行空白再叠 margin-left，把操作列撑宽导致按钮被省略号吞掉。
 */
.tbl-ops { display: inline-flex; align-items: center; gap: 8px; }
/* nowrap：「重置密码」这种四字按钮在窄列里会把文字折成两行，整行被撑高 */
.tbl-ops .layui-btn { margin: 0 !important; padding: 0 8px; white-space: nowrap; }

/* ===== 列表页：头部工具栏 ===== */
.list-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 15px;
}
.list-toolbar .toolbar-kw {
    display: flex;
    align-items: center;
}
.list-toolbar .toolbar-kw .layui-form-label {
    /* 下限 70、随文字长度自适应：固定 70px 会把「单据 / 对象」截成「单据 / 对…」，
       三字以内的标签宽度不变，短标签位置与原来一致 */
    width: auto;
    min-width: 70px;
    padding: 9px 10px;
    text-align: center;
    white-space: nowrap;
}
.list-toolbar .kw-input {
    width: 130px;
    margin-bottom: 0;
}
.list-toolbar .kw-input-wide {
    width: 230px;
}
/* 性别这类只有两三个字的下拉，用标准宽度会空一大截 */
.list-toolbar .kw-input-xs {
    width: 92px;
}
.list-toolbar .toolbar-sep {
    color: #999;
    padding: 0 2px;
}
.list-toolbar .kw-input .layui-input {
    width: 100%;
    box-sizing: border-box;
    text-align: left;
}
/* 工具栏里的原生下拉（未走 layui form.render 的页面）。
   注意：外层若带 layui-form，layui 会把 select 渲染成自己的下拉并隐藏原生 select，
   这里的 display:block 会盖掉 layui 的 display:none 导致出现两个下拉框，故排除。 */
.list-toolbar-wrap:not(.layui-form) select {
    display: block;
    width: 100%;
    height: 38px;
    line-height: 38px;
    border: 1px solid #e6e6e6;
    border-radius: 2px;
    background: #fff;
    padding: 0 8px;
    box-sizing: border-box;
    color: #333;
    cursor: pointer;
}
/* layui 渲染后的下拉：宽度撑满所在的 kw-input */
.list-toolbar .kw-input .layui-form-select,
.list-toolbar .kw-input .layui-form-select .layui-input {
    width: 100%;
    box-sizing: border-box;
}
.list-toolbar .toolbar-btns {
    display: flex;
    gap: 10px;
}
.list-toolbar .toolbar-btns .layui-btn {
    margin: 0;
}
/*!* 工资页：年份 / 月份下拉宽度收紧（LayUI 默认 100%，需覆盖） *!*/
#year-sel + .layui-form-select { width: 120px; }
#month-sel + .layui-form-select { width: 120px; }

.detail-header {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px 20px;
    padding: 15px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 15px;
}
.detail-header .field {
    display: flex;
}
.detail-header .field label {
    width: 80px;
    color: #666;
}
.detail-header .field .val {
    flex: 1;
    font-weight: 500;
}

.detail-items table {
    border-collapse: collapse;
    width: 100%;
    background: #fff;
}
.detail-items th, .detail-items td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}
.detail-items th { background: #f5f5f5; }

/* ===== 详情页：上下两部分 ===== */
/* 详情页顶部：参照编辑页 layui-form-pane 布局，只读 */
.view-form {
    margin-bottom: 18px;
}
.view-form .layui-form-item {
    margin-bottom: 15px;
}
.view-form .layui-form-label {
    width: 110px;
    background: #f0f2f5;
    color: #646a73;
}
.view-form .layui-inline {
    margin-right: 10px;
}

/* 顶部信息：与编辑页一致的 3+3 两行，每行三格均分铺满 */
.view-form .view-top-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    margin-bottom: 15px;
}
.view-form .view-top-row > .layui-inline {
    flex: 1 1 0;
    min-width: 0;
    margin-right: 0;
    margin-bottom: 0;
    display: flex;
    align-items: stretch;
}
.view-form .view-top-row .layui-input-inline {
    width: auto !important;
    flex: 1 1 auto;
    min-width: 0;
    margin-right: 0;
    display: block;
}
.view-val {
    min-height: 38px;
    line-height: 38px;
    padding: 0 10px;
    background: #fff;
    border: 1px solid #e4e7ed;
    color: #1f2329;
    font-weight: 600;
    box-sizing: border-box;
    word-break: break-all;
}
.view-val-remarks {
    min-height: 38px;
    line-height: 1.6;
    padding: 9px 10px;
    white-space: pre-wrap;
}

/* 详情页：款式图（缩略图 + 点击看大图） */
.view-image-box {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 38px;
    padding: 6px 0;
}
.view-style-img {
    max-width: 240px;
    max-height: 180px;
    object-fit: contain;
    border: 1px solid #e4e7ed;
    border-radius: 6px;
    background: #fafbfc;
    cursor: default;   /* 已取消点击放大，仅保留悬停预览 */
    transition: border-color .15s;
}
.view-style-img:hover { border-color: #16baaa; }
.view-image-tip { font-size: 12px; color: #909399; }
.view-image-empty { font-size: 13px; color: #c0c4cc; line-height: 38px; }
/* 款式图行：标签不被图片撑高，保持与其它字段一致的单行灰底块 */
.view-form .view-top-row.view-image-row > .layui-inline { align-items: flex-start; }
.view-form .view-top-row.view-image-row .layui-form-label { height: 38px; }

.view-bottom {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 18px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.view-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 12px;
    flex-wrap: wrap;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}
.view-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 0;
    padding-left: 10px;
    border-left: 4px solid #16baaa;
    line-height: 18px;
}
.view-search { display: flex; align-items: center; gap: 8px; }
.view-search #view-kw { width: 260px; display: inline-block; }

.view-items {
    border-collapse: collapse;
    width: 100%;
    background: #fff;
}
.view-items th, .view-items td {
    border: 1px solid #e6e6e6;
    padding: 10px 8px;
    text-align: center;
}
.view-items th {
    background: #fafafa;
    font-weight: 500;
    color: #666;
}
.view-items tbody tr:hover { background: #f9fcfb; }

.view-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 8px;
}
.view-pager-info { color: #888; font-size: 13px; }
.view-pager-btns { display: flex; align-items: center; gap: 6px; }
.view-pager-btns button[disabled] { opacity: 0.4; cursor: not-allowed; }
.view-pager-cur {
    display: inline-block;
    padding: 0 10px;
    color: #333;
    font-size: 13px;
}

/* 打印样式 */
@media print {
    .layui-header, .app-nav, .layui-card-header button, #btn-back, #btn-edit { display: none !important; }
    .layui-body { padding: 0 !important; left: 0 !important; top: 0 !important; }
    .layui-card { border: none !important; box-shadow: none !important; }
    body { background: #fff !important; }
}

/* ===== 表单页：备注 textarea（高度对齐 input + 文本居中） ===== */
.remarks-wrap {
    position: relative;
    width: 100%;
}
.remarks-wrap .remarks-placeholder {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    color: #999;
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
    line-height: 1.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90%;
}
.textarea-remarks {
    width: 100%;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 10px !important;
    line-height: 38px !important;
    resize: none !important;
    overflow: hidden;
    box-sizing: border-box;
    display: block;
    position: relative;
    z-index: 2;
    background: transparent !important;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.textarea-remarks:focus {
    height: 90px !important;
    min-height: 90px !important;
    padding: 8px 10px !important;
    line-height: 1.6 !important;
    overflow: auto;
    white-space: normal;
    text-overflow: clip;
    resize: vertical !important;
}
.textarea-remarks:not(:placeholder-shown) {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 10px !important;
    line-height: 38px !important;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.textarea-remarks:not(:placeholder-shown):focus {
    height: 90px !important;
    min-height: 90px !important;
    padding: 8px 10px !important;
    line-height: 1.6 !important;
    overflow: auto;
    white-space: normal;
    text-overflow: clip;
    resize: vertical !important;
}
.textarea-remarks:not(:placeholder-shown) ~ .remarks-placeholder {
    display: none;
}

/* ===== 表单页：明细栏 ===== */
.items-toolbar { margin-bottom: 12px !important; }
.items-toolbar .items-toolbar-right {
    margin-left: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.items-toolbar .items-toolbar-right .layui-btn {
    /* 按钮高度与 layui-input 默认一致，宽度与明细输入框列对齐。
       margin-left 清零：layui 对相邻按钮默认附加 10px，会与容器的 gap 叠加成 20px */
    margin-left: 0;
    height: 38px;
    line-height: 38px;
    padding: 0 18px;
    font-size: 14px;
}
.items-toolbar + #items-table { margin-top: 18px; }
.items-toolbar .items-toolbar-desc {
    color: #888;
    font-size: 13px;
    margin-left: 4px;
}

/* ===== 表单页：保存/返回悬空底部（不随明细行数上下挪动） ===== */
.form-actions-fixed {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background: #ffffff;
    border-top: 1px solid #eee;
    padding: 12px 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04);
}
.form-actions-fixed .layui-btn { margin-left: 0; }
/* 表单底部「存盘后的去处」文字链（去开裁单 / 查看订单）：与按钮同一行，弱化成链接 */
.form-actions-fixed .save-next-link {
    align-self: center;
    font-size: 13px;
    color: #1d63d8;
    text-decoration: none;
    border-bottom: 1px dashed rgba(29, 99, 216, .5);
    padding-bottom: 1px;
    white-space: nowrap;
}
.form-actions-fixed .save-next-link:hover { color: #0b47b0; border-bottom-color: #0b47b0; }
/* 留出底部按钮区域高度，避免明细最后一行被遮挡 */
body.order-form-page .layui-body { padding-bottom: 80px !important; }
/* 批量删除回执：成功几条、哪几条没删掉及原因 */
.bd-res { padding: 16px 20px 8px; max-height: 420px; overflow: auto; }
.bd-res-h { font-size: 14px; margin-bottom: 10px; }
.bd-res .bd-bad { color: #cf1322; }
.bd-res ul { margin: 0; padding-left: 0; list-style: none; }
.bd-res li {
    display: flex; gap: 10px; padding: 7px 0;
    border-top: 1px dashed #ebedf0; font-size: 13px; line-height: 1.6;
}
.bd-res .bd-name { flex: 0 0 auto; max-width: 200px; font-weight: 600; color: #1f2329;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-res .bd-why { flex: 1 1 auto; color: #8a8f99; }

/* 明细表格内下拉面板需盖在底部固定操作栏之上，否则靠下的行点击下拉会被返回/保存栏遮挡 */
#items-table .layui-form-select dl { z-index: 2000 !important; }

/* 订单表单页顶部：3+3 均匀两行 */
.order-form-page .form-top-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
}
.order-form-page .form-top-row > .layui-inline {
    flex: 1 1 0;
    min-width: 0;
    margin-right: 0;
    margin-bottom: 0;
    display: flex;
    align-items: stretch;
}
.order-form-page .form-top-row .layui-input-inline {
    flex: 1 1 auto;
    width: auto !important;
    min-width: 0;
    margin-right: 0;
    display: block;
}
/* 修复：layui .layui-form-item 的 clearfix ::after 在 flex 容器内会被当作第 4 个子项，
   吃掉最后一个 16px 列间距，导致「3+3」两行最右列右边缘内缩 16px、与备注行/明细表不齐。 */
.order-form-page .form-top-row::after,
.view-form .view-top-row::after { display: none; }

/* 款式新增/编辑：固定一行三列（栏宽均分），款式图单独一行 */
.order-form-page .form-top-row.style-top-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 16px;
}
.order-form-page .form-top-row.style-top-row > .layui-inline {
    width: auto;
}
/* 备注这类长文本占满一整行（款式图独立行在 HTML 结构上保证） */
.order-form-page .form-top-row.style-top-row > .layui-inline.field-span-all {
    grid-column: 1 / -1;
}
/* 占两列：前面还有 1 列字段时用（如「价格档位 + 备注」凑满一行三列） */
.order-form-page .form-top-row.style-top-row > .layui-inline.field-span-2 {
    grid-column: 2 / -1;
}
/* 款式备注：单独一行，给两行高度（工艺要求常常不止一句），纵向可拉但不能横向拉出栅格 */
.order-form-page .style-remarks {
    min-height: 64px;
    height: 64px;
    padding: 8px 10px;
    line-height: 1.6;
    resize: vertical;
}
/* 计件单位：lay-ignore 保持原生下拉，外观对齐 layui-input */
select.layui-input { padding-right: 4px; }

/* 工序库导入弹窗：搜索 + 分页清单（已在本表的工序不展示） */
.pi-wrap { padding: 14px 18px 4px; }
.pi-search { position: relative; margin-bottom: 10px; }
.pi-search .layui-icon {
    position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
    font-size: 14px; color: #c0c4cc; pointer-events: none;
}
.pi-search-input {
    width: 100%; box-sizing: border-box; height: 34px; line-height: 34px;
    padding: 0 12px 0 30px; font-size: 13px;
    border: 1px solid #e5e6eb; border-radius: 4px; background: #fff; color: #1d2129;
    transition: border-color .15s;
}
.pi-search-input:hover { border-color: #d0d3d9; }
.pi-search-input:focus { outline: none; border-color: #16baaa; }
.pi-empty { padding: 54px 0; text-align: center; color: #a8b0ba; font-size: 13px; }
.pi-list { height: 404px; overflow-y: auto; border: 1px solid #e5e6eb; border-radius: 6px; }
.pi-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-bottom: 1px solid #f2f3f5;
    cursor: pointer; transition: background .12s;
}
.pi-item:last-child { border-bottom: none; }
.pi-item:hover { background: #f5f7fa; }
.pi-item input { flex: 0 0 auto; width: 16px; height: 16px; margin: 0; cursor: pointer; accent-color: #16baaa; }
.pi-name { flex: 1; min-width: 0; font-size: 14px; color: #1d2129; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pi-meta { flex: 0 0 auto; font-size: 12px; color: #86909c; }
.pi-pager {
    display: flex; align-items: center; justify-content: center; gap: 14px;
    padding: 12px 0 2px; font-size: 13px; color: #4e5969;
}
.pi-page-btn {
    padding: 4px 14px; font-size: 13px; border-radius: 3px; cursor: pointer;
    border: 1px solid #dcdfe6; background: #fff; color: #4e5969;
    transition: border-color .15s, color .15s;
}
.pi-page-btn:hover:not(:disabled) { border-color: #16baaa; color: #16baaa; }
.pi-page-btn:disabled { color: #c0c4cc; border-color: #e5e6eb; background: #fafbfc; cursor: not-allowed; }
.pi-page-info { color: #86909c; }
.pi-actions { padding: 10px 0 4px; text-align: right; }

/* 订单表单 - 款式图片上传（只允许一张）：有图显示缩略图，无图显示虚线加号框 */
.img-uploader { display: flex; align-items: center; gap: 12px; }
.img-box { position: relative; width: 96px; height: 96px; }
.img-box img {
    width: 96px; height: 96px; object-fit: cover; display: block;
    border: 1px solid #e5e6eb; border-radius: 6px; background: #fafbfc;
}
.img-del {
    position: absolute; top: -8px; right: -8px;
    width: 20px; height: 20px; line-height: 18px; text-align: center;
    background: #f56c6c; color: #fff; border-radius: 50%;
    font-size: 14px; cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
}
.img-del:hover { background: #e04b4b; }
.img-add {
    width: 96px; height: 96px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    border: 1px dashed #c9cdd4; border-radius: 6px;
    background: #fafbfc; color: #86909c; font-size: 12px; cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
}
.img-add .layui-icon { font-size: 22px; }
.img-add:hover { border-color: #16baaa; color: #16baaa; background: #f0fbfa; }
.img-tip { margin-top: 6px; color: #909399; font-size: 12px; }

/* 订单列表 - 款式图缩略图 */
.order-thumb {
    width: 44px; height: 44px; display: block; margin: 0 auto;
    object-fit: cover; border: 1px solid #e5e6eb; border-radius: 4px;
    cursor: default; background: #fafbfc; transition: border-color .15s;  /* 仅悬停预览，无点击 */
}
.order-thumb:hover { border-color: #16baaa; }

/* 款式图列：表格单元格固定 38px 高、上下各 6px 内边距，内容区只剩 26px，
   44px 的缩略图下半截直接被裁掉。图片列去掉上下内边距、缩略图收到 36px，正好整张露出来 */
.layui-table td[data-field="imageUrl"] .layui-table-cell,
.layui-table td[data-field="styleImageUrl"] .layui-table-cell { padding-top: 0; padding-bottom: 0; }
.layui-table td[data-field="imageUrl"] .order-thumb,
.layui-table td[data-field="styleImageUrl"] .order-thumb { width: 36px; height: 36px; }

/* 款式图悬停放大预览卡（列表缩略图、详情页大图共用；尺寸由 JS 按视口计算）
   不拦截鼠标事件，避免「弹出→移出→再弹出」的闪烁 */
.style-preview {
    position: fixed;
    z-index: 19891015;
    padding: 6px;
    background: #fff;
    border: 1px solid #e5e6eb;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(31, 35, 41, .18);
    pointer-events: none;
    animation: stylePreviewIn .12s ease-out;
}
.style-preview img {
    display: block;
    min-width: 80px;
    object-fit: contain;
    border-radius: 4px;
    background: #fafbfc;
}
@keyframes stylePreviewIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 列表页「清空」按钮（搜索按钮后，重置搜索框） */
.btn-clear {
    padding: 0 14px;
    height: 38px;
    line-height: 36px;
}
.btn-clear .layui-icon { font-size: 16px; }

/* 列表页「情况」弹窗 */
.stat-panel {
    padding: 16px 18px;
}
.stat-cards {
    display: flex;
    gap: 14px;
    margin-bottom: 16px;
}
.stat-card {
    flex: 1;
    text-align: center;
    background: linear-gradient(135deg, #f0fbfa 0%, #f7fff9 100%);
    border: 1px solid #d4ece8;
    border-radius: 6px;
    padding: 16px 10px;
}
.stat-card-qty {
    background: linear-gradient(135deg, #fff7f0 0%, #fffdf7 100%);
    border-color: #f0e0d4;
}
.stat-num {
    font-size: 26px;
    font-weight: 700;
    color: #16baaa;
    line-height: 1.2;
}
.stat-card-qty .stat-num {
    color: #ff8a3d;
}
.stat-label {
    margin-top: 4px;
    font-size: 13px;
    color: #888;
}
.stat-sub {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    padding-left: 2px;
}
.stat-table {
    margin: 0;
}
.stat-table th, .stat-table td {
    text-align: center;
}

/* ===== 顶部导航菜单 ===== */
.app-nav {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    z-index: 999;
    background: #393d49;
    height: 42px;
    line-height: 42px;
    padding: 0 20px;
    display: flex;
    align-items: stretch;
    gap: 2px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}
.layui-body { top: 102px; bottom: 0; }
.app-nav-item {
    display: inline-block;
    height: 42px;
    line-height: 42px;
    padding: 0 14px;
    color: #c2c2c2;
    font-size: 14px;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.15s ease;
    white-space: nowrap;
}
/* 导航图标：菜单表里的 icon（layui 图标类）渲到 <i> 上。
   一级项与下拉项都用它，靠 .app-ico 统一控大小与间距，避免每处写 margin */
.app-nav-item .app-ico {
    margin-right: 6px;
    font-size: 14px;
    vertical-align: -1px;
    opacity: 0.85;
}
.app-nav-item:hover .app-ico,
.app-nav-item.active .app-ico { opacity: 1; }
/* 小节标题里的图标更小一点：它是分区的示意，不是可点项 */
.app-nav-sec-title .app-ico {
    margin-right: 5px;
    font-size: 12px;
    opacity: 0.9;
}
.app-nav-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}
.app-nav-item.active {
    color: #fff;
    border-bottom-color: #16baaa;
}

/* 导航上的待办数字（收菲异常）：红底白字小胶囊，挂在菜单名右边。
   不用 absolute 定位是为了不改变 42px 导航高度，数字大小也随文字走 */
.app-nav-badge {
    display: inline-block;
    margin-left: 5px;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: #e0576c;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    vertical-align: 1px;
}

/* 「配置管理」下拉分组 */
.app-nav-group {
    position: relative;
    display: inline-block;
    height: 42px;
}
.app-nav-group-head { user-select: none; }
.app-nav-group-head::after {
    content: '';
    display: inline-block;
    margin-left: 6px;
    margin-top: -2px;
    vertical-align: middle;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #8a8f99;
    transition: transform 0.15s ease;
}
.app-nav-group.open .app-nav-group-head::after { transform: rotate(180deg); }
.app-nav-sub {
    display: none;
    position: absolute;
    top: 42px;
    left: 0;
    min-width: 148px;
    padding: 6px 0;
    background: #393d49;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    z-index: 1001;
}
.app-nav-group.open .app-nav-sub { display: block; }
.app-nav-sub .app-nav-item {
    display: block;
    height: 38px;
    line-height: 38px;
    padding: 0 18px;
    font-size: 13px;
}
.app-nav-sub .app-nav-item.active {
    border-bottom-color: transparent;
    background: rgba(22, 186, 170, 0.18);
}

/* 下拉里的小节（三级菜单）：权限管理 → 权限配置 / 组织架构 / 系统运维。
   标题不可点、比菜单项淡一档，下面三项缩进 12px 表示从属关系；
   小节之间一条 1px 分隔线，扫一眼能数清有几块 */
.app-nav-sec + .app-nav-sec { margin-top: 4px; }
.app-nav-sec-title {
    padding: 7px 18px 3px;
    color: #7e838f;
    font-size: 12px;
    line-height: 16px;
    letter-spacing: 0.5px;
    user-select: none;
}
.app-nav-sub .app-nav-sub-item {
    padding-left: 30px;
    height: 34px;
    line-height: 34px;
}

/* ===== 顶部导航右侧：用户名 / 修改密码 / 退出登录 ===== */
.app-nav-logout { display: flex; align-items: center; margin: 0; }
.app-nav-logout-btn {
    background: none;
    border: none;
    color: #c2c2c2;
    font-size: 14px;
    cursor: pointer;
    padding: 0 12px;
    height: 42px;
    line-height: 42px;
    white-space: nowrap;
    flex-shrink: 0;
}
.app-nav-logout-btn:hover { color: #fff; }
.app-nav-user {
    color: #c2c2c2;
    font-size: 14px;
    padding: 0 12px;
    white-space: nowrap;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-left: auto;
    flex-shrink: 0;
}
.app-nav-pwd-btn {
    background: none;
    border: none;
    color: #c2c2c2;
    font-size: 14px;
    cursor: pointer;
    padding: 0 12px;
    height: 42px;
    line-height: 42px;
    white-space: nowrap;
    flex-shrink: 0;
}
.app-nav-pwd-btn:hover { color: #fff; }


/* ===== 明细行内下拉框对齐 ===== */
#items-body select.input-sm {
    height: 32px;
    line-height: 32px;
    padding: 0 6px;
}

.layui-layout-admin .layui-body {
    position: absolute;
    top: 110px;
    padding-bottom: 44px;
    left: 0;
    padding: 5px;
}

/* ===== 主数据新增/编辑弹窗（横向紧凑：label 靠右、控件靠左，同一行排开） ===== */
.modal-form { max-width: 460px; margin: 0 auto; }
.modal-form .mf-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-bottom: 18px;
}
/* label 固定宽 + 右对齐：保证每行控件的左边缘都对齐在同一条线上 */
.modal-form .mf-label {
    flex: 0 0 auto;
    min-width: 96px;
    box-sizing: border-box;
    text-align: right;
    font-size: 13px;
    color: #646a73;
    font-weight: 500;
    padding: 10px 12px 0 0;
    margin: 0;
}
/* 行里除 label/hint 外就是控件本体：basis 归零再撑满剩余宽度，靠左排
   （用 1 1 0 而不是 auto：控件自带 width:100%，auto 会按整行宽算而换行）
   开关/单个勾选框是固定尺寸的小控件，拉满一行会变形，这里直接排除在拉伸之外 */
.modal-form .mf-row > :not(.mf-label):not(.mf-hint):not(.layui-form-switch):not(.layui-form-checkbox),
.modal-form .mf-cell > :not(.mf-label):not(.mf-hint):not(.layui-form-switch):not(.layui-form-checkbox) {
    flex: 1 1 0;
    min-width: 0;
}
/* 开关比输入框矮：往下挪一点，跟 label/输入框的视觉中线齐平 */
.modal-form .mf-row .layui-form-switch,
.modal-form .mf-cell .layui-form-switch { margin-top: 8px; }
.modal-form .layui-input,
.modal-form .layui-textarea {
    width: 100%;
    border-radius: 4px;
    border-color: #dcdfe6;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.modal-form .layui-input:focus,
.modal-form .layui-textarea:focus {
    border-color: #16baaa;
    box-shadow: 0 0 0 2px rgba(22,186,170,.12);
}
.modal-form .layui-textarea { min-height: 88px; resize: vertical; }
/* 控件下方的灰字说明（如成本类型提示）：缩进到控件起点，不顶到行首 */
.modal-form .mf-hint {
    flex: 1 1 100%;
    box-sizing: border-box;
    padding-left: 108px;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.6;
    color: #909399;
}
/* 底部操作区：上方分隔线 + 居中按钮组，与表单视觉分离 */
.modal-form .mf-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid #f0f0f0;
}
.modal-form .mf-actions .layui-btn { min-width: 96px; }

/* ===== 用户管理弹窗：人员名册 + 可选登录账号 ===== */
/* 弹窗自身有 560px 宽度，.modal-form 默认 460px 会挤成一条，这里放开 */
/* 表单本身当纵向 flex：内容短时操作条被推到最底，内容长时跟着内容走并吸底 */
.modal-form.wk-form {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    min-height: 100%;
    max-width: 100%;
    padding: 14px 24px 0;
}
.modal-form.wk-form .mf-row { margin-bottom: 10px; }
/* 每行高度按内容来：容器变矮时不许压缩字段（否则输入框会叠在一起），装不下就交给内容区滚动 */
.modal-form.wk-form > * { flex: 0 0 auto; }
.modal-form.wk-form .mf-hint { margin-top: 5px; }
.wk-sep {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0 10px;
    font-size: 13px;
    color: #8a94a6;
}
.wk-sep::before, .wk-sep::after {
    content: '';
    flex: 1 1 auto;
    height: 1px;
    background: #eef0f3;
}
.wk-sep span { flex: 0 0 auto; }
/* 用户弹窗三个 tab：用户信息 / 账号权限 / 组织岗位，页签贴着内容区顶部 */
.wk-tabs {
    display: flex;
    gap: 4px;
    margin: -6px -24px 14px;
    padding: 0 16px;
    border-bottom: 1px solid #eef0f3;
}
.wk-tab {
    padding: 9px 14px;
    font-size: 13px;
    color: #606266;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    user-select: none;
}
.wk-tab:hover { color: #16b777; }
.wk-tab.active {
    color: #16b777;
    font-weight: 600;
    border-bottom-color: #16b777;
}
/* 角色多选：layui 复选盒横向铺开，窄屏自动换行 */
.wk-roles {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 4px;
    /* 勾选盒是 16px 小图标，比输入框矮一截：整块下移，让勾选文字的重心对齐右侧 label 文字重心
       （按文字范围量过：盒中心会偏高约 5px，所以要以文字为准，不能用盒子中心） */
    margin-top: 10px;
}
.wk-roles .layui-form-checkbox[lay-skin="primary"] { margin-top: 0; }
/* 组织岗位：部门/岗位/职务各占一行，行距比其它 tab 松一点，层次更分明 */
.wk-panel[data-panel="org"] .mf-row { margin-bottom: 14px; }
/* 弹窗底部的操作条（footer）：吸在滚动内容下沿，字段再多也一直浮在最底下；
   左右负边距铺满弹窗整宽，上方一道分隔线 + 很浅的投影，视觉上像悬在内容之上 */
.wk-form-bar {
    position: sticky;
    bottom: 0;
    z-index: 9;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin: auto -24px 0;
    padding: 12px 24px;
    background: #fff;
    border-top: 1px solid #f0f0f0;
    box-shadow: 0 -8px 16px -12px rgba(16, 24, 40, .28);
}
.wk-form-bar .layui-btn { margin: 0; }
/* 开关 + 右侧说明同一行（说明解释的就是这个开关，不该另起一行） */
.wk-form .wk-inline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 32px;
}
.wk-form .wk-inline-hint {
    font-size: 12px;
    line-height: 1.6;
    color: #909399;
}
/* 已开通账号时的「当前账号」条 */
.wk-account-now {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    background: #f7f8fa;
    border-radius: 8px;
    font-size: 13px;
    color: #606266;
}
/* 账号条右侧的操作：重置密码 / 解除绑定（编辑态不提供密码输入框） */
.wk-account-ops { margin-left: auto; display: flex; gap: 14px; }
.wk-reset-pwd { color: #1e6fdd; cursor: pointer; }
.wk-reset-pwd:hover { text-decoration: underline; }
.wk-unbind { color: #ff5722; cursor: pointer; }

/* ===== 多选勾选组件（角色 / 部门 / 岗位 / 职务） ===== */
/* 字典条目会一直长，平铺复选盒会把弹层撑高、还要靠肉眼扫。
   这里用固定高度：已选标签在上、过滤框居中、列表定高滚动，高度不随条数变化。 */
.ms {
    border: 1px solid #e6e8eb;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
}
/* 已选区：勾了几项一眼看到；选得多时自身滚动，不挤占列表高度 */
.ms-picked {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    max-height: 66px;
    overflow-y: auto;
    padding: 7px 10px;
    background: #fbfcfd;
    border-bottom: 1px solid #f0f2f4;
}
.ms-none { font-size: 12px; color: #b6bcc6; }
.ms-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    padding: 2px 7px;
    font-size: 12px;
    line-height: 18px;
    color: #0f9d6e;
    background: #eaf8f2;
    border: 1px solid #bfe9d8;
    border-radius: 3px;
}
.ms-chip b { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-chip .ms-x {
    font-style: normal;
    font-size: 13px;
    line-height: 1;
    color: #79c6aa;
    cursor: pointer;
}
.ms-chip .ms-x:hover { color: #ff5722; }

.ms-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-bottom: 1px solid #f0f2f4;
}
.ms-kw {
    flex: 1 1 auto;
    min-width: 0;
    height: 30px;
    padding: 0 9px;
    font-size: 13px;
    border: 1px solid #e6e8eb;
    border-radius: 4px;
    outline: none;
}
.ms-kw:focus { border-color: #16b777; }
.ms-count { flex: 0 0 auto; font-size: 12px; color: #8a94a6; }
.ms-clear { flex: 0 0 auto; font-size: 12px; color: #ff5722; }
.ms-toggle { flex: 0 0 auto; font-size: 12px; color: #16b777; }
/* 收起态：只留已选标签 + 搜索行，列表整块隐掉（三个多选同时展开会把弹层顶出屏幕） */
.ms-closed .ms-list { display: none; }
.ms-closed .ms-bar { border-bottom: none; }

/* 列表定高：条目从 5 条涨到 500 条，弹层高度都一样。
   小屏（笔记本 600 高、浏览器缩放）再压一档：展开后整块要塞进弹层，
   否则底部几行会被 sticky 保存条压住（点上去等于点保存） */
.ms-list { max-height: min(178px, 34vh); overflow-y: auto; padding: 3px 0; }
.ms-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    font-size: 13px;
    color: #3d4451;
    cursor: pointer;
    user-select: none;
}
.ms-item:hover { background: #f6fbf9; }
.ms-item.on { background: #f0faf6; color: #0f9d6e; }
.ms-box {
    position: relative;
    flex: 0 0 auto;
    width: 15px;
    height: 15px;
    border: 1px solid #d5d9df;
    border-radius: 2px;
    background: #fff;
}
.ms-item.on .ms-box { background: #16b777; border-color: #16b777; }
.ms-item.on .ms-box::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: 2px solid #fff;
    border-top: 0;
    border-left: 0;
    transform: rotate(45deg);
}
.ms-lab { flex: 0 0 auto; }
.ms-sub {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 12px;
    color: #a8b0bd;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ms-empty { padding: 16px 10px; text-align: center; font-size: 12px; color: #b6bcc6; }
.wk-unbind:hover { text-decoration: underline; }

/* 物料类型弹窗：字段 × 用途 的勾选矩阵（左：物料录入，右：导出列） */
.modal-form .mf-matrix {
    border: 1px solid #ebeef5;
    border-radius: 6px;
    overflow: hidden;
}
.modal-form .mf-matrix-head,
.modal-form .mf-matrix-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 84px 84px;
    align-items: center;
    padding: 2px 12px;
}
.modal-form .mf-matrix-head {
    background: #fafafa;
    border-bottom: 1px solid #ebeef5;
    padding: 7px 12px;
    font-size: 12px;
    color: #909399;
}
.modal-form .mf-matrix-row + .mf-matrix-row { border-top: 1px dashed #f2f3f5; }
.modal-form .mf-matrix-name { font-size: 13px; color: #303133; }
/* 勾选列居中，与表头文字对齐 */
.modal-form .mf-matrix-c { text-align: center; }
.modal-form .mf-matrix-row .layui-form-checkbox[lay-skin="primary"] { margin: 3px 0; }

/* 物料类型弹窗：内容占满弹窗宽度（其它主数据弹窗仍保持 460px 居中），整体更紧凑 */
.modal-form.modal-form-wide { max-width: 100%; }
/* 岗位/职务弹窗：两列表单用满弹窗宽度（默认 460px 居中会把 1:1 两列挤掉） */
.modal-form.modal-form-2col { max-width: 100%; }
/* 员工类型弹窗：两列输入 + 三列开关，用满弹窗宽度（默认 460px 会把右列挤掉） */
.modal-form.modal-form-et { max-width: 100%; }
.modal-form .mf-row-2 {
    display: grid;
    /* 组织/用户等表单统一一行两列、两列各占一半（1:1） */
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
    align-items: start;
}
.modal-form .mf-row-2 .mf-cell { min-width: 0; }
/* cell 内部同样横向排：label 右对齐、控件靠左（与整行版一致） */
.modal-form .mf-cell {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}
.modal-form .mf-cell .mf-hint { flex: 1 1 100%; padding-left: 108px; }
/* 物料类型：名称列自适应、成本类型列固定窄条（勾选控件不需要半行宽） */
.modal-form.modal-form-wide .mf-row-2 {
    grid-template-columns: minmax(0, 1fr) 210px;
}
/* 员工类型弹窗：两列也平均分（物料类型仍保持左自适应+右固定） */
.modal-form-et .mf-row-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
/* 三列等宽的一行：三个开关并排，省一整行高度 */
.modal-form .mf-row-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 18px;
    align-items: start;
}
.modal-form .mf-row-3 .mf-cell { min-width: 0; }
/* 不挂在某个控件下的整行灰字说明（如成本类型提示） */
.modal-form .mf-note {
    margin: -10px 0 16px;
    font-size: 12px;
    line-height: 1.6;
    color: #909399;
}
.modal-form.modal-form-wide .layui-textarea { min-height: 64px; }
.modal-form.modal-form-wide .mf-actions { margin-top: 18px; padding-top: 14px; }

/* ===== 物料类型列表：录入字段 / 导出字段两列 ===== */
/* 字段胶囊会把行撑高，这里只在本页放开 layui 单元格的 38px 定高与 nowrap；
   同时纵向居中，让「仅基础字段」「操作时间」这些单行内容不贴顶。 */
body.cat-cfg .layui-table-view .layui-table-cell {
    height: auto;
    min-height: 54px;
    line-height: 1.5;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    display: flex;
    align-items: center;
}
body.cat-cfg .layui-table-view .layui-table td,
body.cat-cfg .layui-table-view .layui-table th { height: auto; }
body.cat-cfg .layui-table-view .layui-table-main td { vertical-align: middle; }

/* 字段胶囊组：字段多时自动换行，不截断 */
.cfg-v { flex: 1 1 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; }
.cfg-chip {
    padding: 0 7px;
    height: 20px;
    line-height: 18px;
    font-size: 11.5px;
    font-style: normal;
    color: #4b5563;
    background: #f7f8fa;
    border: 1px solid #ebedf2;
    border-radius: 4px;
}
/* 唛架长：不是录入字段，用虚边区分 */
.cfg-chip-extra {
    color: #0b7f74;
    background: #f2fbf9;
    border-style: dashed;
    border-color: #bfe6df;
}
.cfg-none { font-size: 12px; color: #b0b6bf; }

/* 成本类型：点 + 文案，取代纯色文字 */
.cat-type {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 9px;
    height: 22px;
    line-height: 22px;
    font-size: 12px;
    border-radius: 11px;
    border: 1px solid transparent;
}
.cat-type i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.cat-type.is-material { color: #0b7f74; background: #eefaf7; border-color: #d5f0ea; }
.cat-type.is-labor    { color: #b45309; background: #fff8ec; border-color: #fbe6c8; }

/* 灰字占位（无该项 / 仅基础字段） */
.cat-muted { color: #c0c4cc; }

/* 款式列表「订单单号」：单号 + 「已删除」小签（订单已删除的孤儿款式）
   用 inline-flex 让单号自己省略、小签不压缩，避免标签被 layui 的省略号吞掉 */
.ord-cell { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; vertical-align: middle; }
.ord-no {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ord-cell .ord-no + .ord-del { flex: 0 0 auto; }
.ord-del {
    display: inline-block;
    padding: 0 6px;
    height: 18px;
    line-height: 17px;
    font-size: 11px;
    font-style: normal;
    color: #9aa1ab;
    background: #f4f5f7;
    border: 1px solid #e6e8ec;
    border-radius: 3px;
    white-space: nowrap;
}
/* 订单已删除时单号本身轻灰（用「已删除」小签表达状态，不再打删除线） */
.ord-cell .ord-no.is-del { color: #9aa1ab; }

/* 删除确认框里的补充说明（订单删除：款式仍保留，可在款式管理里删） */
.del-sub { margin-top: 8px; font-size: 12px; line-height: 1.6; color: #8a9099; }

/* ===== 登录页（PC 端） ===== */
.login-body { background: #f2f3f5; }
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 80vh; }
.login-card { width: 360px; background: #fff; border-radius: 12px; padding: 32px 30px 30px; box-shadow: 0 6px 24px rgba(0,0,0,.10); }
.login-title { text-align: center; font-size: 22px; font-weight: 700; color: #1f2329; }
.login-sub { text-align: center; color: #909399; font-size: 13px; margin: 8px 0 20px; }
.login-field { margin-bottom: 16px; }
.login-field input { width: 100%; height: 44px; border: 1px solid #dcdfe6; border-radius: 8px; padding: 0 14px; font-size: 15px; box-sizing: border-box; }
.login-field input:focus { outline: none; border-color: #16baaa; }
.login-opt { display: flex; align-items: center; justify-content: space-between; margin: -4px 0 16px; }
.login-remember { display: inline-flex; align-items: center; cursor: pointer; font-size: 14px; color: #606266; user-select: none; }
.login-remember input { width: 15px; height: 15px; margin: 0 7px 0 0; accent-color: #16baaa; cursor: pointer; }
.login-remember span { line-height: 1; }
.login-opt-hint { font-size: 12px; color: #b0b3b8; }
.login-btn { width: 100%; height: 46px; border: none; border-radius: 8px; background: #16baaa; color: #fff; font-size: 17px; letter-spacing: 4px; cursor: pointer; margin-top: 4px; }
.login-btn:hover { background: #15ad9e; }
.login-err { background: #fff0f0; color: #f56c6c; border: 1px solid #ffd9d9; border-radius: 8px; padding: 9px 12px; font-size: 13px; margin-bottom: 14px; text-align: center; }
.login-ok { background: #f0fff4; color: #52c41a; border: 1px solid #c9f0d4; border-radius: 8px; padding: 9px 12px; font-size: 13px; margin-bottom: 14px; text-align: center; }

/* ===== 侧栏底部操作（修改密码 / 退出登录按钮在 nav 片段中） ===== */

/* 列表质检红色警告（款号后） */
/* 列表质检：红色感叹号徽标（款号后），hover 款号展示质检结果 */
/* 订单列表：质检结果标记在单号上（红色下划线 + ⚠），悬停显示各款式明细 */
.docno-qc {
    color: #1f2329; cursor: help; padding-bottom: 1px;
    border-bottom: 2px solid #f56c6c;
}
/* 检查全部通过：下划线与对勾转绿，不用红色吓人 */
.docno-qc.docno-ok { border-bottom-color: #67c23a; }
.docno-warn { color: #f56c6c; margin-left: 5px; font-size: 13px; }
.docno-pass { color: #67c23a; margin-left: 5px; font-size: 13px; }

/* ===== 工资核算：视图切换按钮（顶部工具栏） ===== */
.view-btn.active { background-color: #1e9fff; border-color: #1e9fff; color: #fff; }

/* 顶部员工关键字搜索弹窗（读取用户管理里的人员） */
.emp-search-wrap .emp-popup { position: absolute; top: 100%; left: 0; right: 0; z-index: 999; background: #fff; border: 1px solid #dcdfe6; border-radius: 4px; box-shadow: 0 4px 12px rgba(0,0,0,.12); max-height: 260px; overflow-y: auto; margin-top: 2px; }
.emp-popup-item { padding: 8px 12px; cursor: pointer; font-size: 13px; color: #1f2329; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.emp-popup-item:hover, .emp-popup-item.active { background: #f0f7ff; color: #1e9fff; }
.emp-popup-empty { padding: 10px 12px; color: #909399; font-size: 13px; }

/* ===== 营业分析：年度汇总卡片 ===== */
.an-cards { display: flex; gap: 14px; flex-wrap: wrap; margin: 4px 0 16px; }
.an-card {
    flex: 1 1 0;
    min-width: 170px;
    text-align: center;
    background: linear-gradient(135deg, #f0fbfa 0%, #f7fff9 100%);
    border: 1px solid #d4ece8;
    border-radius: 6px;
    padding: 14px 10px;
}
.an-card-qty  { background: linear-gradient(135deg, #f0f7ff 0%, #fafcff 100%); border-color: #cfe4fb; }
.an-card-wage { background: linear-gradient(135deg, #fff7f0 0%, #fffdf7 100%); border-color: #f3ddc8; }
.an-card-avg  { background: linear-gradient(135deg, #f7f5ff 0%, #fdfcff 100%); border-color: #dfd9f2; }
.an-card-qc   { background: linear-gradient(135deg, #fff1f0 0%, #fffafa 100%); border-color: #ffd6d6; }
.an-card-cost { background: linear-gradient(135deg, #f2fbf4 0%, #fafffc 100%); border-color: #d3ecd9; }
.an-card-num { font-size: 24px; font-weight: 700; color: #16baaa; line-height: 1.2; word-break: break-all; }
.an-card-qty .an-card-num  { color: #1e9fff; }
.an-card-wage .an-card-num { color: #fa8c16; }
.an-card-avg .an-card-num  { color: #722ed1; }
.an-card-qc .an-card-num   { color: #cf1322; }
.an-card-cost .an-card-num { color: #2f9e44; }
.an-card-label { margin-top: 4px; font-size: 13px; color: #888; }
.an-card-label span { color: #606266; font-weight: 600; }

/* ===== 营业分析：图表面板 ===== */
.an-panel {
    background: #fff;
    border: 1px solid #ebeef5;
    border-radius: 6px;
    padding: 12px 16px 16px;
    margin-bottom: 16px;
}
.an-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.an-panel-title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2329;
    padding-left: 10px;
    border-left: 4px solid #16baaa;
    line-height: 18px;
}
.an-panel-total { font-size: 13px; color: #646a73; }
.an-panel-total b { color: #1f2329; }
.an-toggle { display: flex; gap: 6px; }
.an-toggle .layui-btn { margin: 0; height: 30px; line-height: 28px; padding: 0 12px; font-size: 13px; }
.an-chart-wrap { position: relative; width: 100%; }
.an-chart { width: 100%; height: 240px; }
.an-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #909399;
    font-size: 14px;
    background: #fff;
}

/* ===== 营业分析：次品原因 Top 条形 ===== */
.an-panel-sub { margin-left: 8px; font-size: 12px; font-weight: 400; color: #909399; }
.an-reason-list { display: flex; flex-direction: column; gap: 8px; padding: 4px 0 2px; }
.an-reason-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.an-reason-name { width: 96px; flex: none; color: #303133; text-align: right;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.an-reason-bar { flex: 1 1 auto; height: 14px; background: #f4f6f8; border-radius: 3px; overflow: hidden; }
.an-reason-fill { height: 100%; background: linear-gradient(90deg, #ffa39e 0%, #cf1322 100%); border-radius: 3px; }
.an-reason-val { width: 108px; flex: none; text-align: right; color: #606266; }
.an-reason-val b { color: #cf1322; }
.an-reason-empty { color: #909399; font-size: 13px; padding: 10px 2px; }

/* EXCEL 视图内联表格（与统计块同宽） */
.excel-wrap { overflow-x: auto; width: 100%; padding-bottom: 6px; }
table.excel-table { border-collapse: collapse; width: 100%; min-width: 100%; font-size: 13px; color: #1f2329; }
table.excel-table th, table.excel-table td { border: 1px solid #d0d7de; padding: 6px 14px; text-align: center; white-space: nowrap; min-width: 52px; }
table.excel-table thead th { background: #1f4e79; color: #fff; font-weight: 600; }
table.excel-table td { background: #fff; }
table.excel-table .excel-title { background: #f5f7fa; color: #1f2329; font-weight: 700; font-size: 15px; text-align: center; padding: 8px; }
table.excel-table .excel-amount { color: #cf1322; font-weight: 700; }
table.excel-table .excel-total-label { color: #cf1322; font-weight: 700; text-align: center; background: #fff5f5; }
/* ===== 系统设置页 ===== */
.sys-page { padding: 14px 20px 24px !important; overflow-y: auto; }
/* 卡片竖排、卡片内字段两列并排：一屏看得到更多设置，左右两列行基线对得齐 */
.sys-wrap { max-width: 1080px; margin: 0 auto; }
.sys-wrap > .layui-card { margin-bottom: 12px; }
.sys-wrap .layui-card { background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0, 0, 0, .06); }
.sys-wrap .layui-card-header {
    height: 42px; line-height: 42px; padding: 0 18px;
    font-size: 14px; font-weight: 600; color: #303133; border-bottom: 1px solid #f0f1f4;
}
.sys-wrap .layui-card-body {
    padding: 12px 18px 14px;
    /* 非弹窗页面统一栅格：字段一行三列（窄屏由下面的媒体查询回落） */
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 28px; row-gap: 0; align-items: start;
}
.sys-wrap .sys-field { margin-bottom: 13px; }
.sys-wrap .sys-hint { line-height: 1.65; }
.sys-wrap .sys-actions { margin-top: 2px; }
/* 说明块 / 目录条 / 按钮 / 脚注 / 需要整行的字段：占满一行 */
.sys-wrap .layui-card-body > .sys-hint,
.sys-wrap .layui-card-body > .sys-now,
.sys-wrap .layui-card-body > .sys-now-sub,
.sys-wrap .layui-card-body > .sys-actions,
.sys-wrap .layui-card-body > .sys-note,
.sys-wrap .layui-card-body > .sys-span-2,
.sys-wrap .layui-card-body > .sys-grid-3 { grid-column: 1 / -1; }
/* 三个价格档位横向排一行（标签在上，输入框占满列宽） */
.sys-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 20px; }
.sys-grid-3 .sys-field { flex-direction: column; gap: 4px; margin-bottom: 14px; }
.sys-grid-3 .sys-field-label { width: auto; padding-top: 0; text-align: left; }
.sys-now {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: #f7f9fc; border: 1px solid #eef1f6; border-radius: 6px; padding: 10px 14px;
}
.sys-now-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sys-now-label { flex: none; font-size: 12px; color: #8a94a6; }
.sys-now-main code { font-family: Consolas, Menlo, monospace; font-size: 13px; color: #1f2d3d; word-break: break-all; }
.sys-badge { flex: none; font-size: 12px; padding: 1px 8px; border-radius: 10px; background: #f2f3f5; color: #909399; }
.sys-badge.good { background: #e8f7ee; color: #1a9c53; }
.sys-badge.bad { background: #fdecec; color: #d93026; }
.sys-now-sub { margin: 6px 0 18px; font-size: 12px; color: #909399; }
.sys-field { display: flex; gap: 14px; margin-bottom: 16px; }
.sys-field-label { flex: none; width: 96px; padding-top: 9px; font-size: 13px; color: #606266; text-align: right; }
.sys-field-ctrl { flex: 1 1 auto; min-width: 0; }
.sys-inline { display: flex; gap: 8px; }
.sys-inline .layui-input { flex: 1 1 auto; }
.sys-inline .layui-btn { flex: none; }
.sys-hint { margin-top: 6px; font-size: 12px; line-height: 1.7; color: #909399; }
.sys-hint code { background: #f4f5f7; padding: 0 3px; border-radius: 3px; }
.sys-check { display: inline-flex; align-items: center; gap: 6px; padding-top: 6px; font-size: 13px; color: #303133; cursor: pointer; }
.sys-check input { width: 14px; height: 14px; }
.sys-select { height: 36px; padding: 0 8px; background-color: #fff; }
.sys-actions { display: flex; justify-content: center; gap: 10px; margin-top: 4px; }
.sys-note {
    margin-top: 18px; padding: 12px 14px; background: #fbfcfe;
    border: 1px dashed #e3e8f0; border-radius: 6px;
    font-size: 12px; line-height: 1.8; color: #7a8394;
}
.sys-note b { color: #4a5568; }

/* 菲票打印格式的字段编排（系统设置） */
.fp-fld-list { border: 1px solid #e8eaed; border-radius: 6px; background: #fff; max-width: 560px; min-width: 320px; }
.fp-fld-row { display: flex; align-items: center; padding: 7px 10px; border-bottom: 1px solid #f0f1f3; font-size: 13px; color: #1f2329; }
.fp-fld-row:last-child { border-bottom: none; }
.fp-fld-name { flex: 1 1 auto; min-width: 0; }
.fp-fld-hint { color: #a0a6ae; font-size: 12px; margin-left: 8px; }
.fp-fld-btn {
    flex: 0 0 auto; border: 1px solid #d9dce1; background: #fff; border-radius: 4px;
    width: 24px; height: 24px; line-height: 22px; text-align: center;
    cursor: pointer; margin-left: 6px; color: #4e5155; font-size: 12px; user-select: none;
}
.fp-fld-btn:hover { border-color: #1e80ff; color: #1e80ff; }
.fp-fld-btn.is-off { opacity: 0.35; pointer-events: none; }
.fp-fld-add { margin-top: 8px; font-size: 13px; color: #646a73; }
.fp-fld-chip {
    display: inline-block; margin: 0 8px 6px 0; padding: 3px 10px;
    border: 1px dashed #b8c0cc; border-radius: 14px; cursor: pointer;
    font-size: 12px; color: #4e5155;
}
.fp-fld-chip:hover { border-color: #1e80ff; color: #1e80ff; }
/* 票面高度 = 打孔区 + 内容区，只读合计 */
.fp-sum { display: flex; align-items: center; gap: 4px; height: 38px; font-size: 16px; color: #1f2329; }
.fp-sum b { font-size: 20px; color: #1e80ff; }
/* 实际尺寸预览：票面按 mm 渲染，打孔区浅底 + 与内容区的分界线一眼可见 */
.fp-preview {
    display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap;
    padding: 14px; border: 1px dashed #d9dce1; border-radius: 6px; background: #fafbfc;
}
.fp-preview-note { flex: 1 1 200px; min-width: 180px; font-size: 12px; line-height: 1.8; color: #8a919c; }
#fp-preview .fp-hole { background: rgba(30, 128, 255, 0.07); border-bottom: 1px dashed #bcd4f7; }
/* 票面本身不印边框（打印出来是废线）；预览里给一条虚线便于看边界，只在设置页生效 */
#fp-preview .fp-label { border: 1px dashed #bcd4f7; }

/* 数据范围模块勾选卡片已下线：配置入口统一到「菜单管理」的「数据范围表 / 参与隔离」 */
/* 开关 */
.sys-switch { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; cursor: pointer; }
.sys-switch input { display: none; }
.sys-switch-track {
    position: relative; width: 42px; height: 22px; border-radius: 11px;
    background: #d8dce3; transition: background .2s;
}
.sys-switch-track::after {
    content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
    border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: left .2s;
}
.sys-switch input:checked + .sys-switch-track { background: #1e9fff; }
.sys-switch input:checked + .sys-switch-track::after { left: 22px; }
.sys-switch-text { font-size: 13px; color: #606266; }
/* 窗口窄：三列退两列，再窄退单列，避免每列控件被挤成一条缝 */
@media (max-width: 1280px) {
    .sys-wrap .layui-card-body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
    .sys-wrap .layui-card-body { grid-template-columns: minmax(0, 1fr); }
    .sys-grid-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
    .sys-field { flex-direction: column; gap: 6px; }
    .sys-field-label { width: auto; padding-top: 0; text-align: left; }
    .sys-actions { padding-left: 0; }
}

/* ===== 物料类型编辑弹窗（PC）：参考移动端风格美化，仅作用于 .modal-form-wide ===== */
/* 输入类控件：8px 圆角 + 蓝色聚焦环（移动端主题色 #2d8cf0） */
.modal-form.modal-form-wide .layui-input,
.modal-form.modal-form-wide .layui-textarea {
    border-radius: 8px;
}
.modal-form.modal-form-wide .layui-input:focus,
.modal-form.modal-form-wide .layui-textarea:focus {
    border-color: #2d8cf0;
    box-shadow: 0 0 0 3px rgba(45,140,240,.14);
}
/* 成本类型开关：圆角胶囊 + 蓝色开启态（原为 layui 默认绿色直角） */
.modal-form.modal-form-wide .layui-form-switch {
    border-radius: 20px;
    min-width: 78px;
}
.modal-form.modal-form-wide .layui-form-switch em { border-radius: 20px; }
.modal-form.modal-form-wide .layui-form-onswitch {
    background-color: #2d8cf0;
    border-color: #2d8cf0;
}
/* 字段配置矩阵：软卡片观感 —— 10px 圆角、浅灰表头、实线细分隔、行悬停高亮 */
.modal-form.modal-form-wide .mf-matrix {
    border: 1px solid #eef0f3;
    border-radius: 10px;
    background: #fff;
}
.modal-form.modal-form-wide .mf-matrix-head {
    background: #f7f8fa;
    border-bottom: 1px solid #f0f2f5;
    font-weight: 500;
}
.modal-form.modal-form-wide .mf-matrix-head,
.modal-form.modal-form-wide .mf-matrix-row { padding: 4px 14px; }
.modal-form.modal-form-wide .mf-matrix-row + .mf-matrix-row { border-top: 1px solid #f5f6f8; }
.modal-form.modal-form-wide .mf-matrix-row:hover { background: #fafbfd; }
.modal-form.modal-form-wide .mf-matrix-name { color: #1f2329; }
/* 底部按钮：8px 圆角；保存键用移动端主色蓝 */
.modal-form.modal-form-wide .mf-actions .layui-btn { border-radius: 8px; height: 38px; }
.modal-form.modal-form-wide .mf-actions .layui-btn:not(.layui-btn-primary) {
    background-color: #2d8cf0;
}
.modal-form.modal-form-wide .mf-actions .layui-btn:not(.layui-btn-primary):hover {
    background-color: #1f7de0;
}
.modal-form.modal-form-wide .mf-actions .layui-btn.layui-btn-primary:hover {
    border-color: #c3cad4;
}
/* 按钮区离弹窗下沿留一点呼吸空间 */
.modal-form.modal-form-wide .mf-actions { margin-bottom: 8px; }

/* ============================================================
   订单多款式（订单表单款式卡片 / 款式库选款弹窗 / 订单详情款式分块）
   ============================================================ */

/* 订单表单：款式卡片（版式对齐详情页 ov-card） */
.style-block.ov-card { background: #fff; }
.ov-style-card-head .btn-style-del {
    margin-left: auto; height: 30px; line-height: 30px; padding: 0 14px; font-size: 12px;
}
.ov-style-no.ov-muted { color: #bfc4cc; font-weight: 400; }
.style-block-tag { color: #e6a23c; font-size: 12px; }
.style-img-inline .layui-input-inline { width: auto; }
.style-img-wrap { position: relative; display: inline-block; }
.style-img {
    width: 88px; height: 88px; object-fit: cover;
    border-radius: 8px; border: 1px solid #dcdfe6; cursor: zoom-in; display: block;
}
.style-img-del {
    position: absolute; top: -7px; right: -7px; width: 18px; height: 18px;
    line-height: 16px; text-align: center; border-radius: 50%;
    background: #f56c6c; color: #fff; font-size: 13px; cursor: pointer; display: block;
}
.style-img-add {
    width: 88px; height: 88px; border: 1px dashed #c0c4cc; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: #909399; font-size: 12px; text-align: center; cursor: pointer; line-height: 1.4;
    background: #fafbfc;
}
.style-img-add:hover { border-color: #2d8cf0; color: #2d8cf0; }

/* 编辑态字段：灰底标签 + 白底无边框输入（外观同详情页 ov-field）
   选择器带 .ov-value 提高权重，避免被下方 .ov-value 的 padding 撑高单元格 */
.ov-value.ov-value-edit { padding: 0; }
.ov-value-edit .layui-input {
    height: 42px; line-height: 42px; border: 0; border-radius: 0;
    background: transparent; box-shadow: none;
    padding: 0 14px; font-size: 13px; color: #1f2329;
}
.ov-field-edit { transition: border-color .15s, box-shadow .15s; }
.ov-field-edit:focus-within {
    border-color: #16baaa; box-shadow: 0 0 0 2px rgba(22, 186, 170, .08);
}
/* 只读展示单元格（单号 / 款式数 / 总件数）：纯文本、高度与可编辑格一致 */
.ov-value .ov-muted { color: #bfc4cc; }

/* 数量被裁单锁住：框子置灰、不显示光标，右侧挂一句来源说明。
   「下单数量 = 裁单裁数合计」，改数量必须去裁单管理改裁单，这里只展示 */
.layui-input.is-locked {
    background: #f2f3f5 !important; color: #6b7280; cursor: not-allowed;
}
.ov-qty-lock {
    flex: 0 0 auto; margin-left: 6px; white-space: nowrap;
    font-size: 12px; color: #909399;
}
/* hidden 属性必须能压过 .style-img-add / .style-img 的 display，否则已上传图与「＋款式图」占位同时出现 */
.style-img-wrap [hidden] { display: none !important; }

/* 编辑态明细表：明细标题行 + 无竖线表格，单元格内放紧凑输入控件
   （用 .ov-table.ov-edit-table 提高优先级，避免被下方 .ov-table td 的 44px 大间距覆盖） */
.order-styles-head { margin-top: 4px; }
/* 款式区：按钮紧跟「款式 共 N 款」胶囊之后，不推到最右侧 */
.order-styles-head .ov-detail-actions { margin-left: 0; }
/* 明细区：「添加一行」紧跟「明细 共 N 条」胶囊之后 */
.ov-detail .ov-detail-actions { margin-left: 0; }
.ov-detail-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.ov-table.ov-edit-table td { height: auto; padding: 6px 8px; }
.ov-table.ov-edit-table td.seq, .ov-table.ov-edit-table td:first-child { text-align: center; color: #909399; }
.ov-table.ov-edit-table td:last-child { text-align: center; }
.ov-edit-table .layui-input.input-sm {
    height: 34px; line-height: 34px; padding: 0 8px; font-size: 13px;
    border: 1px solid #e6e8eb; border-radius: 4px;
}
.ov-edit-table .layui-input.input-sm:focus { border-color: #16baaa; }
.ov-edit-table select.input-sm {
    height: 34px; padding: 0 8px; font-size: 13px; border: 1px solid #e6e8eb; border-radius: 4px;
}
/* layui 渲染后的下拉框：把替身的 input 收紧凑 */
.ov-edit-table .layui-form-select .layui-input {
    height: 34px; line-height: 34px; padding: 0 26px 0 8px; font-size: 13px;
    border: 1px solid #e6e8eb; border-radius: 4px;
}
.ov-edit-table .layui-form-select .layui-input:focus { border-color: #16baaa; }
.ov-edit-table .layui-form-select dl { z-index: 2000; }
.ov-edit-table .btn-del { font-size: 12px; height: 26px; line-height: 26px; padding: 0 10px; }
.ov-table.ov-edit-table .ov-empty { color: #999; text-align: center; height: 56px; }
/* 扎号重复/非法：输入框标红（保存时还会再拦一次，这里只是提前让人看见） */
.ov-edit-table .layui-input.is-dup {
    border-color: #f56c6c; background: #fff1f0;
}
.ov-edit-table .layui-input.is-dup:focus { border-color: #f56c6c; }
/* 扎号列：居中的纯数字，别继承 td:first-child 的灰色说明文字颜色 */
.ov-table.ov-edit-table td:first-child .layui-input { color: #1f2329; text-align: center; }

/* 从款式库选款弹窗：搜索行（输入/搜索/加入订单同高对齐）+ 分页多选列表 */
.sp { padding: 4px 20px 14px; }
.sp-head { display: flex; align-items: center; gap: 8px; padding: 8px 0 12px; }
.sp-search { position: relative; flex: 1 1 auto; min-width: 0; }
.sp-search-ico {
    position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
    font-size: 14px; color: #b9bfc9; pointer-events: none;
}
.sp-input {
    display: block; width: 100%; height: 34px; line-height: 32px;
    padding: 0 12px 0 32px; box-sizing: border-box;
    border: 1px solid #e0e3e9; border-radius: 6px;
    font-size: 13px; color: #1f2329; background: #fff; outline: none;
}
.sp-input:hover { border-color: #c6cad1; }
.sp-input:focus { border-color: #16baaa; box-shadow: 0 0 0 3px rgba(22, 186, 170, .1); }
.sp-btn {
    flex: 0 0 auto; height: 34px; line-height: 32px; padding: 0 16px;
    border-radius: 6px; font-size: 13px;
}
/* 搜索：次级按钮（白底描边）；加入订单：主操作（实心） */
.sp-head .sp-btn {
    background: #fff; border: 1px solid #dcdfe6; color: #4e5969;
}
.sp-head .sp-btn:hover { border-color: #16baaa; color: #16baaa; }
.sp-head .sp-btn-ok {
    background: #16baaa; border: 1px solid #16baaa; color: #fff;
}
.sp-head .sp-btn-ok:hover { background: #12a89a; border-color: #12a89a; color: #fff; }

.sp-body { height: 386px; overflow: auto; border: 1px solid #ebeef5; border-radius: 8px; background: #fff; }
.sp-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.sp-table thead th {
    height: 38px; padding: 0 12px; text-align: left;
    background: #f7f8fa; border-bottom: 1px solid #ebeef5;
    color: #606266; font-size: 13px; font-weight: 500;
}
.sp-table tbody td {
    height: 42px; padding: 0 12px; font-size: 13px; color: #1f2329;
    border-bottom: 1px solid #f4f6f8; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}
.sp-table tbody tr:last-child td { border-bottom: 0; }
.sp-tr { cursor: pointer; }
.sp-tr:hover td { background: #f7fbfa; }
.sp-tr.picked td { background: #f0fbf9; }
.sp-no { font-weight: 600; }
.sp-table tbody td.sp-color, .sp-table tbody td.sp-cust { color: #5b6472; }
/* 客户列：名称可省略，但「已下单」标签不能被裁掉 */
.sp-table tbody td.sp-cust { display: flex; align-items: center; }
.sp-cust-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
/* 已下单标签：橙色小胶囊，跟在客户名后 */
.sp-tag {
    display: inline-block; margin-left: 6px; padding: 0 6px; height: 18px; line-height: 18px;
    font-size: 11px; color: #d46b08; background: #fff7e6;
    border: 1px solid #ffd591; border-radius: 9px; vertical-align: middle;
    flex: 0 0 auto; white-space: nowrap;
}
.sp-num { text-align: right; }
.sp-table th.sp-num { text-align: right; }
.sp-table th.sp-ck, .sp-table td.sp-ck { text-align: center; padding: 0; }
.sp-box {
    position: relative; display: inline-block; width: 16px; height: 16px;
    border: 1px solid #d2d6dd; border-radius: 3px; background: #fff;
    vertical-align: middle; cursor: pointer; box-sizing: border-box;
}
.sp-box:hover { border-color: #16baaa; }
.sp-tr.picked .sp-box, .sp-box.checked { background: #16baaa; border-color: #16baaa; }
.sp-tr.picked .sp-box::after, .sp-box.checked::after {
    content: ''; position: absolute; left: 4px; top: 0; width: 5px; height: 9px;
    border: 2px solid #fff; border-top: 0; border-left: 0; transform: rotate(45deg);
}
.sp-empty-row td {
    height: 150px; text-align: center; color: #909399; font-size: 13px;
    white-space: normal;
}
.sp-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; }
.sp-stat { font-size: 13px; color: #909399; }
.sp-stat b { color: #1f2329; font-weight: 600; }
.sp-stat b.sp-picked-n { color: #16baaa; }
.sp-pager { display: flex; gap: 6px; }
.sp-pg {
    min-width: 32px; height: 30px; line-height: 28px; padding: 0 9px;
    text-align: center; border: 1px solid #e6e8eb; border-radius: 6px;
    font-size: 13px; color: #606266; cursor: pointer;
    user-select: none; box-sizing: border-box;
}
.sp-pg:hover { border-color: #16baaa; color: #16baaa; }
.sp-pg.active { background: #16baaa; border-color: #16baaa; color: #fff; }
.sp-pg.active:hover { color: #fff; }
.sp-pg.disabled { color: #c8ccd4; border-color: #eef0f2; cursor: not-allowed; }
.sp-pg.disabled:hover { color: #c8ccd4; border-color: #eef0f2; }

/* 裁床单「明细」弹窗：复用选款弹窗的搜索/表格/分页样式，只把列表区改成自适应高度。
   选款弹窗的 .sp-body 是写死 386px（一页固定 8 行），明细分页每页 10 行、行高 42，
   直接套会撑出滚动条、底部统计还被挤在边上，所以这里用 flex 撑满剩余空间。 */
.ci { height: 100%; box-sizing: border-box; display: flex; flex-direction: column; padding: 0 16px 14px; }
.ci .sp-head, .ci .sp-foot { flex: 0 0 auto; }
.ci .sp-head { gap: 6px; padding: 12px 0 10px; }
.ci .sp-input { height: 36px; line-height: 34px; }
.ci .sp-btn { height: 36px; line-height: 34px; padding: 0 18px; }
.ci .sp-body { flex: 1 1 auto; height: auto; min-height: 0; }

/* 成本核算「新增」选款弹窗（样式列表） */
.op-style-list { height: 380px; overflow: auto; padding: 8px 16px 16px; }
.op-style-row {
    display: flex; align-items: center; gap: 14px;
    padding: 9px 12px; border: 1px solid #eef0f2; border-radius: 8px;
    margin-bottom: 8px; cursor: pointer; background: #fff;
}
.op-style-row:hover { border-color: #2d8cf0; background: #f0f7ff; }
.op-style-row .op-no { font-weight: 600; color: #1f2329; min-width: 110px; }
.op-style-row .op-color { color: #606266; min-width: 100px; }
.op-style-row .op-cust { color: #606266; flex: 1; }
.op-style-row .op-cost { color: #909399; font-size: 12px; }

/* ===== 订单详情：卡片 + 字段网格（对齐参考版式） ===== */
.ov-card {
    border: 1px solid #ebeef5; border-radius: 10px; background: #fff;
    margin-bottom: 16px; box-shadow: 0 1px 3px rgba(15, 34, 58, .04);
}
.ov-card .layui-card-header {
    height: 48px; line-height: 48px; padding: 0 20px;
    font-size: 15px; font-weight: 600; color: #1f2329;
    border-bottom: 1px solid #f0f2f5;
}
.ov-card .layui-card-body { padding: 18px 20px 20px; }

.ov-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 16px;
}
.ov-field {
    display: flex; align-items: stretch; min-height: 44px;
    border: 1px solid #ebeef5; border-radius: 4px;
    background: #fff; overflow: hidden;
}
.ov-label {
    flex: 0 0 92px; display: flex; align-items: center; justify-content: center;
    background: #f7f8fa; border-right: 1px solid #ebeef5;
    color: #606266; font-size: 13px; line-height: 1;
}
.ov-value {
    flex: 1 1 auto; min-width: 0;
    display: flex; align-items: center;
    padding: 8px 14px; font-size: 13px; line-height: 1.6;
    color: #1f2329; word-break: break-word;
}
.ov-muted { color: #bfc4cc; }

/* 款式图整行：标签贴在左上角，图片在右侧自由撑高 */
.ov-field-full { grid-column: 1 / -1; }
.ov-field-image { grid-column: 1 / -1; }
.ov-image-box { display: inline-flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.ov-field-image .ov-label {
    flex: 0 0 92px; height: 44px; align-self: flex-start;
    border-right: 1px solid #ebeef5; border-bottom: 1px solid #ebeef5;
}
.ov-value-image { padding: 12px 14px; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.ov-field-image .view-style-img {
    max-width: 200px; max-height: 150px; object-fit: contain;
    border: 1px solid #ebeef5; border-radius: 6px; background: #fafbfc;
    cursor: zoom-in;
}
.ov-field-image .view-style-img:hover { border-color: #16baaa; }
.ov-field-image .view-image-tip { font-size: 12px; color: #909399; }
.ov-field-image .view-image-empty {
    display: inline-flex; align-items: center; justify-content: center;
    width: 132px; height: 88px;
    border: 1px dashed #dcdfe6; border-radius: 6px; background: #fafbfc;
    color: #c0c4cc; font-size: 13px;
}
.ov-empty-block { padding: 24px; text-align: center; color: #999; margin: 0; }

/* 款式卡片头部 */
.ov-style-card-head { display: flex; align-items: center; gap: 12px; }
.ov-style-title { font-size: 15px; font-weight: 600; color: #1f2329; }
.ov-style-no { font-size: 14px; font-weight: 600; color: #16baaa; }
.ov-style-sub { font-size: 13px; color: #909399; }
.style-qc-warn { color: #f56c6c; font-size: 12px; margin-left: auto; }

/* 明细区 */
.ov-detail { margin-top: 16px; }
.ov-detail-head {
    display: flex; align-items: center; gap: 12px;
    flex-wrap: wrap; margin-bottom: 12px;
}
.ov-detail-title {
    display: inline-flex; align-items: center; gap: 8px;
    height: 32px; padding: 0 16px;
    background: #f7f8fa; border: 1px solid #ebeef5; border-radius: 4px;
    font-size: 13px; font-weight: 600; color: #1f2329;
}
.ov-detail-count { font-weight: 400; font-size: 12px; color: #909399; }
/* 扎号跨床接续提示：本床从第几扎起（第 2 床起接着上一床编） */
.bundle-tip {
    margin-left: 8px; padding: 1px 8px; border-radius: 10px;
    font-weight: 400; font-size: 12px; color: #1f6feb;
    background: #eef4ff; border: 1px solid #d6e4ff;
}
/* 裁床明细校验没过的行：短暂高亮，配合 JS 滚到视野内 */
.cs-row-err td { background: #fff1f0; }
.cs-row-err td input,
.cs-row-err td select { border-color: #ff7875; }
/* 裁单表单：明细标题条与上方字段网格之间必须留白（原先 0 间距，32px 的标题条看起来像压在
   摘要格上）；操作按钮紧跟「本床明细」胶囊之后，不推到最右侧 */
.cs-detail-head { margin-top: 18px; margin-bottom: 10px; }
.cs-detail-head .ov-detail-actions { margin-left: 0; }
.cs-detail-head .layui-btn { height: 32px; line-height: 32px; }
/* 做工明细默认收起：工资走扫码口径时这张表没人看，但留着备查 */
.ov-detail.is-closed .ov-detail-body { display: none; }
.ov-detail-tip { font-weight: 400; font-size: 12px; color: #a8b0bd; }
.ov-search { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.ov-search .ov-kw { width: 240px; height: 32px; }
.ov-search .layui-btn-sm { height: 32px; line-height: 32px; padding: 0 14px; }

/* 外层不再 overflow:hidden：明细行内的 layui 下拉选项会被裁掉；
   圆角改由表头两端单元格自己承担 */
.ov-table-wrap { border: 1px solid #ebeef5; border-radius: 6px; overflow: visible; }
.ov-table thead th:first-child { border-top-left-radius: 6px; }
.ov-table thead th:last-child { border-top-right-radius: 6px; }
.ov-table { width: 100%; border-collapse: collapse; background: #fff; }
.ov-table th, .ov-table td {
    padding: 0 16px; height: 44px; text-align: left;
    font-size: 13px; color: #1f2329;
    border-bottom: 1px solid #f0f2f5;
}
.ov-table th { height: 42px; background: #f7f8fa; font-weight: 500; color: #4e5969; }
.ov-table tbody tr:last-child td { border-bottom: 0; }
.ov-table tbody tr:hover td { background: #fafbfd; }
.ov-table .ov-empty { text-align: center; color: #999; height: 72px; }

/* 明细区空态（新建裁单不再预置空行，甲方 2026-11-15）：贴着表头下面一句下一步怎么录 */
.ov-empty-tip {
    padding: 16px 12px; text-align: center;
    font-size: 13px; color: #98a2b3;
    border-top: 1px dashed #eef0f3;
    background: #fcfcfd;
    border-radius: 0 0 6px 6px;
}

@media (max-width: 1280px) {
    .ov-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
    .ov-grid { grid-template-columns: minmax(0, 1fr); }
    .ov-search .ov-kw { width: 100%; }
    .ov-search { width: 100%; margin-left: 0; }
}

/* 款式 → 成本核算弹层：方案列表（三栏卡片） */
.csl { padding: 4px 20px 14px; }
.csl-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; padding: 10px 0 12px; border-bottom: 1px solid #f0f2f5;
}
.csl-head-left { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.csl-title { font-size: 16px; font-weight: 700; color: #1f2329; }
.csl-sub { font-size: 12px; color: #909399; }
/* 头部右侧：多套方案的单件成本均价 + 新建方案 */
.csl-head-right { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; margin-left: 12px; }
.csl-avg {
    display: inline-flex; align-items: baseline; gap: 8px;
    height: 30px; padding: 0 14px;
    background: #fff5f5; border: 1px solid #ffe3e3; border-radius: 6px;
    box-sizing: border-box; white-space: nowrap;
}
.csl-avg-label { font-size: 12px; color: #8a8f99; }
.csl-avg b { font-size: 16px; font-weight: 700; color: #cf1322; }
.csl-avg-label, .csl-avg b { line-height: 28px; }
.csl-list { margin-top: 12px; max-height: 380px; overflow-y: auto; }
.csl-item {
    display: grid; grid-template-columns: 1fr 128px 140px 14px;
    align-items: center; gap: 14px;
    padding: 12px 16px; margin-bottom: 10px;
    border: 1px solid #ebeef5; border-radius: 10px; background: #fff;
    cursor: pointer; transition: border-color .18s, box-shadow .18s, background .18s;
}
.csl-item:hover {
    border-color: #2d8cf0; background: #f7fbff;
    box-shadow: 0 4px 14px rgba(45, 140, 240, .12);
}
.csl-item-name { font-size: 15px; font-weight: 600; color: #1f2329; }
.csl-item-meta { margin-left: 10px; font-size: 12px; color: #909399; }
.csl-item-cost { text-align: right; }
.csl-item-cost b { font-size: 16px; font-weight: 700; color: #cf1322; }
.csl-item-cost span { display: block; font-size: 11px; color: #b0b4bb; margin-top: 1px; }
.csl-item-time { font-size: 12px; color: #a8abb2; text-align: right; }
.csl-arrow { color: #c8cbd0; font-size: 13px; transition: transform .18s, color .18s; }
.csl-item:hover .csl-arrow { color: #2d8cf0; transform: translateX(2px); }
.csl-empty { padding: 42px 0; text-align: center; color: #909399; font-size: 13px; }

/* 款式 → 挂单弹层：选订单（标题栏 + 搜索 + 明细表） */
.opk { padding: 2px 20px 16px; }
.opk-head {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 8px 0 12px; border-bottom: 1px solid #f0f2f5;
}
.opk-titlebar { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; }
.opk-title { font-size: 16px; font-weight: 700; color: #1f2329; }
.opk-chip {
    max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    height: 22px; line-height: 22px; padding: 0 8px;
    border: 1px solid #e3ecfa; border-radius: 4px; background: #f2f7fd;
    color: #2d6bd0; font-size: 12px;
}
.opk-search { position: relative; flex: 0 0 240px; }
.opk-search-ico {
    position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
    font-size: 14px; color: #b6bac2; pointer-events: none;
}
.opk-input {
    width: 100%; height: 32px; line-height: 32px; padding: 0 10px 0 30px;
    border: 1px solid #dcdfe6; border-radius: 6px; box-sizing: border-box;
    font-size: 13px; color: #1f2329; background: #fff;
    transition: border-color .18s, box-shadow .18s;
}
.opk-input:hover { border-color: #c0c4cc; }
.opk-input:focus { border-color: #2d8cf0; box-shadow: 0 0 0 3px rgba(45, 140, 240, .1); outline: none; }
.opk-search-btn { flex: 0 0 auto; height: 32px; line-height: 32px; padding: 0 16px; border-radius: 6px; }
.opk-tip {
    display: flex; align-items: center; gap: 6px;
    margin: 12px 0; padding: 8px 12px;
    border: 1px solid #eef1f6; border-radius: 6px; background: #f8fafc;
    font-size: 12px; color: #7a8291;
}
.opk-tip .layui-icon { font-size: 13px; color: #f0a020; }

/* 订单表格：去竖线、浅灰表头、悬浮行高亮 + 挂单提示 */
.opk .layui-table-view { margin: 0; border: 1px solid #ebeef5; border-radius: 8px; overflow: hidden; }
.opk .layui-table-header { background: #f7f8fa; }
.opk .layui-table-header th {
    background: #f7f8fa; border-bottom: 1px solid #ebeef5;
    font-size: 13px; font-weight: 600; color: #5f6674;
}
.opk .layui-table td, .opk .layui-table th { border-left: 0 !important; border-right: 0 !important; }
.opk .layui-table td {
    border-top: 0 !important; border-bottom: 1px solid #f4f6f8;
    font-size: 13px; color: #1f2329;
}
.opk .layui-table-body tr:last-child td { border-bottom: 0; }
.opk .layui-table-body tr:hover td { background: #f2f8ff; cursor: pointer; }
.opk .layui-table-hover, .opk .layui-table-click { background: transparent !important; }
.opk .opk-pick {
    display: inline-flex; align-items: center; gap: 2px;
    height: 24px; padding: 0 10px; border-radius: 12px;
    background: #eaf3ff; color: #2d8cf0; font-size: 12px;
    opacity: 0; transition: opacity .16s;
}
.opk .opk-pick .layui-icon { font-size: 12px; }
.opk .layui-table-body tr:hover .opk-pick { opacity: 1; }
.opk .layui-table-page { border-top: 0; background: #fff; padding: 8px 12px; }
.opk .layui-table-page .layui-laypage { margin: 0; }
.opk .layui-table-page .layui-laypage a, .opk .layui-table-page .layui-laypage span { border: 0; }
.opk .layui-none { padding: 46px 0; color: #909399; font-size: 13px; }

/* ===== 复制提示条（款式/成本复制时说明「改哪里、复制出来是什么」） =====
   蓝色信息态而不是警告色：这不是错误，只是提醒用户注意唯一键规则 */
.copy-tip {
    display: flex; align-items: flex-start; gap: 8px;
    margin-bottom: 14px; padding: 10px 14px;
    border: 1px solid #d6e6ff; border-radius: 8px; background: #f5f9ff;
    font-size: 12.5px; line-height: 1.75; color: #4b5563;
}
.copy-tip[hidden] { display: none; }
.copy-tip .layui-icon { font-size: 14px; color: #1570ef; line-height: 1.7; }
.copy-tip b { color: #1f2329; font-weight: 600; }

/* ==================== 权限（角色 / 用户） ==================== */
.rbac-key {
    display: inline-block;
    padding: 0 6px;
    height: 20px;
    line-height: 19px;
    font-family: Consolas, Menlo, Monaco, monospace;
    font-size: 12px;
    color: #4b5563;
    background: #f7f8fa;
    border: 1px solid #ebedf2;
    border-radius: 4px;
    vertical-align: middle;
    white-space: nowrap;
}
.rbac-num { font-size: 13px; color: #374151; }
.rbac-on,
.rbac-off {
    display: inline-block;
    padding: 0 8px;
    height: 20px;
    line-height: 19px;
    font-size: 11.5px;
    border-radius: 10px;
    border: 1px solid transparent;
}
.rbac-on  { color: #0b7f74; background: #eefaf7; border-color: #d5f0ea; }
.rbac-off { color: #9aa1ab; background: #f4f5f7; border-color: #e6e8ec; }
.rbac-warn { font-size: 12px; color: #b45309; }

/* 用户表单里的角色多选 */
.rbac-checks { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 16px; padding: 4px 0 2px; }
/* 角色勾选由 layui 渲染成「方框 + 文字」，这里只压掉 layui 自带的外边距，交给 flex 的 gap */
.rbac-checks .layui-form-checkbox[lay-skin=primary] {
    margin: 2px 0;
    padding-left: 24px;
    min-width: 0;
}
.rbac-checks .layui-form-checkbox span {
    font-size: 13px;
    color: #374151;
    padding-right: 0;
}

/* 菜单授权弹层 */
/* 顶部只有「全选 / 清空」两个动作，右对齐，不占纵向空间 */
.rbac-perm-toolbar {
    padding: 8px 16px 0;
    font-size: 12px;
    line-height: 18px;
    text-align: right;
}
.rbac-perm-tree { padding: 6px 12px 12px; }

/* 分组行（配置管理这类只有子页面、自己没地址的节点）只作标题，不参与勾选：
   勾上分组等于整组连坐，权限粒度就没了；保存时分组 id 由前端自动补 */
.rbac-perm-tree .rbac-perm-group-cb { display: none !important; }
.rbac-perm-tree .rbac-perm-group-row .layui-tree-txt { color: #6b7280; font-weight: 500; }

/* 整行可点：小方框太小，点标题/行内空白也能勾选（分组行只展开，不勾选） */
.rbac-perm-tree .layui-tree-entry {
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 4px;
}
.rbac-perm-tree .layui-tree-entry:hover { background: #f2f6ff; }
.rbac-perm-tree .rbac-perm-group-row,
.rbac-perm-tree .rbac-perm-group-row .layui-tree-txt { cursor: default; }
.rbac-perm-tree .rbac-perm-group-row:hover { background: transparent; }
/* 勾选框本身也放大一点命中区域 */
.rbac-perm-tree .layui-form-checkbox { padding-left: 4px; margin-left: -4px; }
.rbac-perm-acts a { color: #1e9fff; margin-left: 12px; }

/* 菜单管理 */
/* 整页不滚动，只让表格内部滚动：避免 layui-body 与表格各出一条滚动条 */
.menu-page { display: flex; overflow: hidden; }
.menu-page .menu-card {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin-bottom: 0;
}
.menu-page .menu-card .layui-card-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding-bottom: 0;
}
.menu-page .menu-table-wrap { flex: 1 1 auto; min-height: 0; overflow: hidden; }
/* 数据范围单元格：表名过长时只省略表名，后面的「参与隔离」标签始终完整 */
.menu-scope { display: flex; align-items: center; gap: 6px; min-width: 0; }
.menu-scope code {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.menu-scope .scope-chip, .menu-scope .scope-empty { flex: 0 0 auto; }
.menu-head-tip {
    margin-left: 10px;
    font-size: 12px;
    font-weight: 400;
    color: #9aa1ab;
}
.menu-tip {
    margin: 2px 0 10px;
    padding: 9px 14px;
    border: 1px solid #d6e6ff;
    border-radius: 8px;
    background: #f5f9ff;
    font-size: 12.5px;
    line-height: 1.7;
    color: #4b5563;
}
.menu-indent { color: #c0c4cc; margin-right: 4px; }
.menu-name-top { font-weight: 600; color: #1f2329; }
.menu-name-sub { color: #374151; }
/* 菜单名前的导航图标：跟顶部导航同一套图标，看着是同一个东西 */
.menu-row-ico {
    display: inline-block;
    width: 16px;
    margin-right: 6px;
    color: #6b7a90;
    font-size: 14px;
    text-align: center;
    vertical-align: -1px;
}
/* 表单里的图标输入 + 预览 + 快捷选择 */
.menu-ico-row { display: flex; align-items: center; gap: 8px; }
.menu-ico-row .layui-input { flex: 1 1 auto; }
.menu-ico-preview {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    line-height: 38px;
    text-align: center;
    border: 1px solid #e4e7ec;
    border-radius: 4px;
    background: #fafbfc;
    color: #3d4a5c;
}
.menu-ico-preview i { font-size: 17px; }
.menu-ico-preview.is-empty { color: #c9ced6; }
.menu-ico-picks { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 3px; }
.menu-ico-picks a {
    box-sizing: border-box;
    display: inline-block;
    width: 22px;
    height: 22px;
    line-height: 20px;
    text-align: center;
    border: 1px solid #e4e7ec;
    border-radius: 4px;
    color: #5a6678;
    background: #fff;
}
.menu-ico-picks a:hover { border-color: #16baaa; color: #16baaa; }
.menu-ico-picks a i { font-size: 13px; }
.menu-del-warn { display: inline-block; margin-top: 4px; color: #b45309; font-size: 12px; }

/* 403 */
.rbac-403 {
    max-width: 520px;
    margin: 96px auto 0;
    padding: 0 20px;
    text-align: center;
}
.rbac-403-code {
    font-size: 64px;
    font-weight: 600;
    line-height: 1;
    color: #e3e6eb;
    letter-spacing: 2px;
}
.rbac-403-title {
    margin-top: 12px;
    font-size: 17px;
    font-weight: 600;
    color: #303640;
}
.rbac-403-desc {
    margin: 12px 0 22px;
    font-size: 13px;
    line-height: 1.9;
    color: #7c838f;
}

/* ===== 操作日志（/system/log） ===== */
.log-tip {
    margin: -4px 0 10px;
    font-size: 12px;
    line-height: 1.8;
    color: #9aa1ab;
}

/* 工具栏里的原生下拉：跟着 layui-input 走，宽度撑满筛选位 */
.list-toolbar .kw-input select.layui-input {
    width: 100%;
    height: 38px;
    padding: 0 6px;
    box-sizing: border-box;
    cursor: pointer;
}

.log-time { font-variant-numeric: tabular-nums; color: #5b6472; font-size: 12.5px; }

.log-user { display: flex; flex-direction: column; line-height: 1.35; }
.log-user b { font-weight: 500; color: #303640; font-size: 13px; }
.log-user i { font-style: normal; font-size: 11.5px; color: #9aa1ab; }

.log-act {
    display: inline-block;
    min-width: 46px;
    padding: 0 8px;
    height: 20px;
    line-height: 19px;
    font-size: 11.5px;
    border-radius: 10px;
    border: 1px solid transparent;
}
.log-act-add   { color: #0b7f74; background: #eefaf7; border-color: #d5f0ea; }
.log-act-edit  { color: #1d6fd8; background: #eaf2fe; border-color: #d8e6fb; }
.log-act-del   { color: #c0392b; background: #fdeceb; border-color: #f8dad7; }
.log-act-other { color: #5b6472; background: #f2f4f7; border-color: #e6e9ee; }

.log-detail {
    font-size: 12px;
    color: #5b6472;
    word-break: break-all;
}
.log-cost { font-size: 12px; color: #8a919c; font-variant-numeric: tabular-nums; }

.log-ok  { color: #0b7f74; font-size: 12px; }
.log-err { color: #c0392b; font-size: 12px; font-weight: 500; }

/* 双击行打开的详情 */
.log-detail-box { padding: 14px 18px; max-height: 420px; overflow: auto; }
.log-detail-row {
    display: flex;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px dashed #eef0f3;
    font-size: 13px;
    line-height: 1.75;
}
.log-detail-row:last-child { border-bottom: 0; }
.log-detail-row > label {
    flex: 0 0 82px;
    color: #9aa1ab;
    font-size: 12.5px;
}
.log-detail-row > div {
    flex: 1;
    min-width: 0;
    color: #303640;
    word-break: break-all;
    white-space: pre-wrap;
}

/* 手机端的日志表：五列要塞进 390px，单元格内边距和标签pill都得收一收 */
@media (max-width: 760px) {
    .layui-table-cell { padding: 0 8px; }
    .log-act { min-width: 0; padding: 0 6px; font-size: 11px; }
    .log-time { font-size: 11.5px; }
    .log-detail { font-size: 11.5px; }
}

/* 勾选列（layui 的 checkbox/radio 列）：46px 的列宽扣掉左右各 15px 内边距只剩 16px，
   装不下 20px 的勾选框，单元格又是 overflow:hidden + text-overflow:ellipsis，
   于是一整列显示成「…」。去掉内边距并居中，让方框正常露出来。
   居中一律用 flex 精确对齐：靠 text-align + line-height 居中，方框会比行中心低 1px，
   页面上看着就是「歪了一块」；带 [lay-id] 的页面（如物料库）另有内边距规则，选择器要比它更具体。 */
.layui-table-view .layui-table-cell.laytable-cell-checkbox,
.layui-table-view .layui-table-cell.laytable-cell-radio {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.layui-table-view .layui-table-cell.laytable-cell-checkbox .layui-form-checkbox[lay-skin="primary"],
.layui-table-view .layui-table-cell.laytable-cell-radio .layui-form-radio {
    margin: 0;
    top: 0;
}

/* ===== 角色数据范围（/system/role） ===== */
.scope-chip {
    display: inline-block;
    padding: 0 8px;
    height: 20px;
    line-height: 19px;
    font-size: 12px;
    color: #1d6fd8;
    background: #eaf2fe;
    border: 1px solid #d8e6fb;
    border-radius: 10px;
}
.scope-empty {
    display: inline-block;
    padding: 0 8px;
    height: 20px;
    line-height: 19px;
    font-size: 12px;
    color: #c0392b;
    background: #fdeceb;
    border: 1px solid #f8dad7;
    border-radius: 10px;
}

/* ===== 弹层表单：成对字段并排 =====
   弹窗放宽之后，短字段再一行一个就变成又宽又长的一条带子，
   纵向也会把弹窗顶得很高。这里两个一列排，长说明的项单独占整行。 */
/* 表单弹层：内边距加在内容区上。
   各页面的表单外层容器是 display:none 的占位 div，开层只取它的 .html()，
   容器自身的 padding 会丢，右列输入框就会顶到弹层边框，看着像溢出。 */
.layui-layer-content.form-layer {
    box-sizing: border-box;
    padding: 16px 16px 4px;
}

.form-grid-2 {
    display: grid;
    /* 注意：这份栅格只用在「新增/编辑角色、菜单」的弹层里（#role-form 是
       display:none 的占位容器，弹出时取 .html()），属于弹窗类，不受
       「非弹窗页面一行三列」约束——弹层宽度有限，三列会把输入框挤成一条缝。 */
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 20px;
    align-items: start;
}
.form-grid-2 > .layui-form-item { margin-bottom: 16px; }
/* 标签要放得下「数据范围表」这种 5 个字，默认 90px 会把字挤成两行。
   用后代选择器，.form-pair 里嵌套的字段也要跟着对齐。 */
.form-grid-2 .layui-form-label {
    width: 104px;
    padding: 9px 10px;
}
.form-grid-2 .layui-input-block { margin-left: 124px; }
/* 角色表单的标签最长 4 个字（角色名称 / 数据范围），用不到 104px，
   窄一档。曾经改成左对齐省地方，甲方 2026-11-14 要求所有表单 label
   一律右对齐，这里改回右对齐（保留窄宽度）。
   注意 layui 的 .layui-form-label 没设 box-sizing，宽度不含 padding：
   实际占位 = 82 + 2 + 10 = 94，所以 margin-left 必须是 94，否则输入框会被挤到下一行 */
.form-grid-2.role-form-grid .layui-form-label {
    width: 82px;
    text-align: right;         /* 甲方要求：表单 label 统一右对齐 */
    padding-left: 2px;
}
.form-grid-2.role-form-grid .layui-input-block { margin-left: 94px; }

/* 说明文字长、需要整行的项 */
.form-grid-2 > .form-grid-full { grid-column: 1 / -1; }

/* 弹窗三列栅格：字段多而短的表单（质检登记这类）用，一行三列压弹窗高度，
   避免内容区出滚动条；个别长字段用 .grid-span-2 跨两列 */
.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 16px;
}
.form-grid-3 > .layui-form-item { margin-bottom: 14px; }
.form-grid-3 > .grid-span-2 { grid-column: span 2; }
.form-grid-3 > .form-grid-full { grid-column: 1 / -1; }
.form-grid-3 .layui-form-label { width: 92px; padding: 9px 10px; }
.form-grid-3 .layui-input-block { margin-left: 112px; }
/* 栅格里的搜索下拉跟普通输入框同高，行与行才不会错位。
   注意只能 display:block（宽随内容区自动收缩），不能给 width:100%——
   百分比宽按包含块全宽算，再叠加 margin-left 的标签宽，会把弹窗撑出横向滚动条 */
.form-grid-3 .ss { display: block; }
.form-grid-3 .ss .ss-txt { height: 38px; line-height: 38px; }

.scope-tip {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.55;
    color: #9aa1ab;
}

/* 菜单表单紧凑版（甲方 2026-11-14：一行两列、布局紧凑）。
   只压行距与列距，不动 .form-grid-2 的栅格结构——角色表单共用
   .form-grid-2，间距保持原来的 20/16。 */
.menu-form { column-gap: 16px; }
.menu-form > .layui-form-item { margin-bottom: 12px; }

/* 勾选账号的滚动区：账号多的时候不让弹层无限长 */
.scope-pick {
    max-height: 168px;
    overflow: auto;
    padding: 6px 10px;
    border: 1px solid #e6e9ee;
    border-radius: 4px;
    background: #fbfcfd;
}
.scope-pick .layui-form-checkbox[lay-skin=primary] {
    display: block;
    margin: 0;
    padding-left: 24px;
    height: 28px;
    line-height: 28px;
}
.scope-pick .layui-form-checkbox[lay-skin=primary] span {
    padding-left: 8px;
    font-size: 13px;
    color: #303640;
}

/* ===== 数据字典：左类型 / 右子项（左右 1:1） ===== */
/* 整页不滚动：左右两栏各自内部滚，和菜单管理同一套「只让表格滚」的口径 */
.dic-page { display: flex; gap: 12px; padding: 10px 12px; overflow: hidden; }
/* 卡片：细边框 + 极浅投影，两栏并排时边界清楚又不抢戏 */
.dic-page .layui-card {
    margin-bottom: 0;
    border: 1px solid #eef0f4;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
    overflow: hidden;
}
.dic-page .layui-card-header {
    height: 46px;
    line-height: 46px;
    padding: 0 14px;
    font-size: 15px;
    font-weight: 600;
    color: #1f2329;
    background: #fff;
    border-bottom: 1px solid #f2f4f7;
}
.dic-page .layui-card-header .menu-head-tip { font-weight: 400; }
.dic-side {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.dic-main {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.dic-side .layui-card-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 12px 12px 0;
}
.dic-main .layui-card-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 12px 12px 0;
}
/* 工具栏/表格样式已回归 list-toolbar 与 layui 默认，与其他列表页一致。
   双栏卡片较窄（半宽 ~620px），只保留贴边与模式提示 */
.dic-mode-tip { flex: 1 1 100%; margin-top: -2px; }

.dic-page .layui-table-view { margin: 0; }
/* 勾选列不留内边距，勾选框才在窄列里居中 */
.dic-page .layui-table-col-special .layui-table-cell { padding: 0; }
.dic-page .layui-table-cell .layui-form-checkbox[lay-skin="primary"] { margin-top: 0; }

.dic-type-name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #1f2329;
}
/* 编号压成灰色等宽小字，名称才是这行的主角 */
.dic-type-code,
.dic-page .layui-table-cell code {
    display: inline-block;
    max-width: 100%;
    padding: 0;
    font-family: Consolas, Menlo, Monaco, monospace;
    font-size: 12px;
    letter-spacing: .2px;
    color: #7b8390;
    background: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}
/* 选中行：淡蓝底 + 左侧一道蓝条，比 layui 的 hover 色明显 */
.dic-side .layui-table-body tr.dic-row-active,
.dic-side .layui-table-body tr.dic-row-active:hover { background: #eef4ff; }
.dic-side .layui-table-body tr.dic-row-active td:first-child { box-shadow: inset 3px 0 0 #2563eb; }
.dic-side .layui-table-body tr.dic-row-active .dic-type-name { color: #1d4ed8; font-weight: 600; }
.dic-side .layui-table-body tr { cursor: pointer; }
/* 操作列：24px 的小方块，hover 才浮现底色，比一排裸图标整齐 */
.dic-row-ops { display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.dic-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 5px;
    color: #2563eb;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.dic-ico:hover { background: #eaf1ff; color: #1d4ed8; }
.dic-ico-del { color: #d9534f; }
.dic-ico-del:hover { background: #fdeeee; color: #c0392b; }
.dic-tag {
    flex: 0 0 auto;
    padding: 0 6px;
    font-size: 11px;
    line-height: 17px;
    color: #8a919c;
    background: #f5f6f8;
    border: 1px solid #e9ecf1;
    border-radius: 9px;
}
.dic-tag-tree { color: #0b7f74; background: #eefaf7; border-color: #d5f0ea; }
.dic-empty {
    padding: 26px 10px;
    text-align: center;
    font-size: 12.5px;
    line-height: 2;
    color: #9aa1ab;
}
.dic-code {
    margin: 0 2px;
    padding: 0 6px;
    font-size: 12px;
    font-weight: 400;
    color: #6b7280;
    background: #f4f5f7;
    border-radius: 4px;
}
.dic-table-wrap { flex: 1 1 auto; min-height: 0; overflow: hidden; }
/* 批量删除的回执：删了几个 + 没删掉的原因清单 */
.dic-batch-sum { padding: 16px 18px 2px; font-size: 13px; color: #1f2329; }
.dic-batch-sum b { color: #d9534f; }
.dic-batch-fail {
    max-height: 200px;
    margin: 6px 0 12px;
    padding: 0 18px 0 34px;
    overflow: auto;
    font-size: 12.5px;
    line-height: 1.9;
    color: #b45309;
}
.dic-tree-cell { display: inline-flex; align-items: center; }
.dic-caret {
    display: inline-block;
    width: 16px;
    font-size: 12px;
    text-align: center;
    color: #9aa1ab;
    cursor: pointer;
}
.dic-caret-leaf { cursor: default; }
.dic-item-name { color: #1f2329; }

/* 双栏只在 ≥1250px 成立（每栏 ≥600px 才装得下两张表的列）；再窄改上下堆叠，表格吃满全宽。
   手机（≤900px）再收紧输入框与间距 */
@media (max-width: 1250px) {
    .dic-page { flex-direction: column; gap: 6px; padding: 6px; }
    .dic-side { flex: 0 0 auto; width: auto; max-height: 42vh; }
    .dic-page .layui-card-header { height: 42px; line-height: 42px; font-size: 14px; }
}
@media (max-width: 900px) {
    .dic-page .list-toolbar { gap: 8px; }
    .dic-page .toolbar-kw .kw-input { width: 110px; }
}

/* ============ 订单表单：快速记菲条（扫码枪 / 手打连续录菲） ============ */
.qb { display: flex; align-items: center; gap: 8px; margin: 8px 0 10px; }
.qb-tag {
    flex: 0 0 auto; font-size: 12px; color: #2d8cf0; white-space: nowrap;
    background: #f0f7ff; border: 1px solid #d4e7ff; border-radius: 3px; padding: 3px 9px;
}
.qb-input { flex: 1 1 auto; width: auto; }
.qb-input:focus { border-color: #2d8cf0; }
.qb-hint-warn { color: #d46b08; }
.qb-hint { flex: 0 0 auto; font-size: 12px; color: #909399; white-space: nowrap; }
.qb-hint-err { color: #f56c6c; }
/* 裁单列表：手改裁数与明细合计不一致时标黄提醒 */
.cut-qty-diff { color: #d46b08; border-bottom: 1px dashed #d46b08; cursor: help; }

/* ============ 裁单编辑：菲票锁定 / 已出票提示条 ============ */
.cs-lock {
    display: flex; align-items: flex-start; gap: 7px;
    margin: 6px 0 10px; padding: 8px 11px; border-radius: 3px;
    font-size: 13px; line-height: 1.6;
}
.cs-lock .layui-icon { font-size: 15px; line-height: 1.6; }
.cs-lock a { text-decoration: underline; }
.cs-lock.is-lock { background: #fef0f0; border: 1px solid #fbd9d9; color: #c45656; }
.cs-lock.is-lock a { color: #c45656; }
.cs-lock.is-tip { background: #fdf6ec; border: 1px solid #faecd8; color: #b88230; }
.cs-lock.is-tip a { color: #b88230; }
.cs-lock b { font-weight: 600; }

/* 拍照识别确认层：字典匹配不上/模糊匹配的行标黄，提醒人工核对 */
.ocr-warn-row > td { background: #fffbe6 !important; }
.ocr-warn-row > td:first-child { position: relative; }
.ocr-warn-row > td:first-child::before {
    content: ''; position: absolute; left: -1px; top: -1px; bottom: -1px;
    width: 3px; background: #ffc53d;
}

/* 锁定后明细行看起来就该是锁住的（layui 的原生 input 禁用态太不明显） */
.ov-edit-table input:disabled,
.ov-edit-table select:disabled,
.qb-input:disabled {
    background: #f5f7fa; color: #909399; cursor: not-allowed; border-color: #e4e7ed;
}
/* 订单款式块顶部的裁床单汇总条（一个款多床：床次 / 件数 / 扎号区间 + 管理入口） */
.ov-sheets {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    margin: 0 0 12px; padding: 8px 10px; font-size: 13px; color: #5b6470;
    background: #f7f9fc; border: 1px solid #e6ebf2; border-radius: 6px;
}
.ov-sheets:empty { display: none; }
.ov-sheet-tag { color: #2d8cf0; font-weight: 600; }
.ov-sheet-chip {
    background: #fff; border: 1px solid #dbe6f5; border-radius: 12px;
    padding: 2px 9px; color: #3b4a5a; cursor: default;
}
/* 订单详情里的床次胶囊：点开＝这一款的裁床单（打菲票、派工、改裁数都在那边） */
.ov-sheet-chip.is-link { cursor: pointer; text-decoration: none; }
.ov-sheet-chip.is-link:hover { border-color: #9cc4f5; background: #f4f9ff; color: #1d63d8; }
.ov-sheet-link { margin-left: auto; color: #2d8cf0; }
/* 未开裁床单的款：占位条用虚线和灰标签，跟「已开 N 床」的实线蓝标签区分开，
   一眼看出这一款还等着开床（点「去开裁单」直接进新建页并预选这一款） */
.ov-sheets.is-empty { background: #fbfcfe; border-style: dashed; }
.ov-sheets .ov-sheet-tag.is-none { color: #8a93a0; font-weight: 500; }
/* 列表页：带条件跳转过来时的提示条 */
.list-filter-tip {
    margin: 0 0 10px; padding: 6px 10px; font-size: 13px; color: #3b4a5a;
    background: #f0f7ff; border: 1px solid #d4e7ff; border-radius: 4px;
}

/* ===== 跨页实体链接：单号/款号/床次点开跳到对方页面 =====
   统一一个长相（蓝字 + 虚下划线 + 小箭头），一眼能看出「这一格能点」。
   箭头只用字符，不占额外节点，列宽多留 8px 就够。 */
.ent-link {
    color: #1d63d8; text-decoration: none; cursor: pointer; white-space: nowrap;
    border-bottom: 1px dashed rgba(29, 99, 216, .5); padding-bottom: 1px;
}
.ent-link:hover { color: #0b47a1; border-bottom: 1px solid #0b47a1; }
.ent-link::after { content: "›"; margin-left: 2px; opacity: .6; font-weight: 600; }
/* 已经是整块按钮/胶囊的地方不再加箭头 */
.ent-link.no-arrow::after { content: none; }

/* 带条件跳转过来的提示条：不能只过滤不吭声，「为什么只剩一条」会被当成故障 */
.filter-bar {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
    margin: 0 0 10px; padding: 7px 10px; font-size: 13px; color: #3b4a5a;
    background: #f0f7ff; border: 1px solid #d4e7ff; border-radius: 6px;
}
.filter-bar-k { color: #6b7a8d; }
.filter-pill {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 4px 2px 9px; background: #fff; border: 1px solid #b9d5f7;
    border-radius: 20px; color: #17519c; line-height: 18px;
}
.filter-pill-x {
    width: 17px; height: 17px; line-height: 16px; text-align: center;
    border-radius: 50%; color: #8a94a6; text-decoration: none; font-size: 14px;
}
.filter-pill-x:hover { background: #e8eff8; color: #d93025; }
.filter-bar-tip { margin-left: auto; color: #8a94a6; font-size: 12px; }
/* 快速记菲刚落的行短暂高亮 */
.items-body tr.row-new > td { animation: rowFlash 1.2s ease; }
@keyframes rowFlash { 0% { background: #eaf3ff; } 100% { background: transparent; } }

/* ===== 款式表单：工序清单（对齐扣菲软件：工序名称 / 工价 / 类型 / 备注） ===== */
.proc-card { margin-top: 18px; border: 1px solid #e6e8eb; border-radius: 8px; background: #fff; }
.proc-card-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 16px; border-bottom: 1px solid #f0f1f3;
}
.proc-title { font-weight: 600; color: #1f2937; }
.proc-count { margin-left: 8px; font-weight: 400; font-size: 12px; color: #909399; }
.proc-tools { display: flex; align-items: center; gap: 8px; }
.proc-tools .layui-btn { margin: 0; }
/* 保存校验没过的工序行：短暂高亮，配合 JS 滚到视野内 */
.proc-row-err td { background: #fff1f0 !important; }
.proc-table tr.proc-row-err td input,
.proc-table tr.proc-row-err td select { border-color: #ff7875; }
.proc-body { padding: 8px 16px 16px; }
.proc-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.proc-table th {
    padding: 8px 6px; background: #fafbfc; border-bottom: 1px solid #ebeef5;
    font-weight: 500; font-size: 12px; color: #909399; text-align: left;
}
.proc-table td { padding: 4px 6px; border-bottom: 1px solid #f2f3f5; }
.proc-input {
    width: 100%; height: 30px; padding: 0 8px; box-sizing: border-box;
    border: 1px solid transparent; border-radius: 4px;
    font-size: 13px; color: #1f2937; background: transparent;
}
.proc-input:hover { border-color: #dcdfe6; }
.proc-input:focus { outline: none; border-color: #1e80ff; background: #fff; }
.proc-input-num { text-align: center; }
.proc-input-num::-webkit-outer-spin-button,
.proc-input-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.proc-input-num { -moz-appearance: textfield; }
.proc-table th.proc-th-center { text-align: center; }
.proc-del {
    display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center;
    border-radius: 50%; color: #c0c4cc; cursor: pointer; font-size: 16px; line-height: 1;
}
.proc-del:hover { background: #fee2e2; color: #ef4444; }
/* 尺码分价：列在系统设置里没开时整列不占位 */
.proc-table.no-size-price .col-size-price { display: none; }
.proc-td-center { text-align: center; }
/* 行号列：只读、不占输入空间；数字等宽，删行重排时不会左右跳 */
.proc-seq {
    color: #909399; font-size: 12px; vertical-align: middle;
    font-variant-numeric: tabular-nums; user-select: none;
}
.proc-size-btn {
    display: inline-block; padding: 2px 8px; border-radius: 10px; cursor: pointer;
    font-size: 12px; color: #1e80ff; background: #eef4ff; white-space: nowrap;
}
.proc-size-btn b { font-weight: 600; }
.proc-size-btn:hover { background: #dbe8ff; }
/* 留空工序：名称可空，行底色淡一点提示「这行本来就不填名字」 */
.proc-table tr.is-blank-proc td { background: #fafbfc; }
.proc-table tr.is-blank-proc [data-f="processName"] { border-style: dashed; }

/* 分码价弹层
   ⚠ 这里的 .sp-* 必须全部挂在 .sp-wrap 下：上面的「选款/明细搜索条」也用了 .sp-input，
   不限定父级的话（同权重、后写的赢）会把搜索框压成 120px 宽、文字居中。 */
.sp-wrap { padding: 14px 16px 4px; }
.sp-wrap .sp-tip { font-size: 12px; color: #909399; line-height: 1.7; margin-bottom: 10px; }
.sp-wrap .sp-tip b { color: #1f2937; }
.sp-wrap .sp-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.sp-wrap .sp-name { width: 56px; flex: none; font-size: 13px; color: #4b5563; text-align: right; }
.sp-wrap .sp-input {
    width: 120px; height: 32px; padding: 0 8px; box-sizing: border-box;
    border: 1px solid #dcdfe6; border-radius: 4px; font-size: 13px; text-align: center;
}
.sp-wrap .sp-input:focus { outline: none; border-color: #1e80ff; }
.sp-wrap .sp-hint { font-size: 12px; color: #b0b3b8; }
/* 分码价弹窗底部按钮栏：「清空分码价」「确定」「取消」三个按钮紧挨着排在同一行最右侧。
   缩进由 justify-content:flex-end 统一控制，清空按钮不再单占左侧留白。 */
.sp-layer .layui-layer-btn { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.sp-layer .layui-layer-btn a { margin: 0; }
.sp-layer .sp-clear {
    height: 30px; padding: 0 14px; border-radius: 15px;
    border: 1px solid #f0d3d3; background: #fff; color: #d9534f;
    font-size: 13px; line-height: 1; font-family: inherit; cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}
.sp-layer .sp-clear:hover { background: #fff7f7; border-color: #e6b0b0; }
.sp-layer .sp-clear:active { background: #ffecec; }
.sp-layer .sp-clear:disabled { cursor: default; }
.sp-layer .sp-clear.is-done { color: #16b777; border-color: #c2e9d8; background: #f3fbf8; }
.proc-empty { padding: 18px 0; text-align: center; font-size: 13px; color: #b0b3b8; }
@media (max-width: 900px) {
}

/* ---------- 菲票报表（/feiReport/list） ---------- */
.report-toolbar {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
    margin-bottom: 12px; font-size: 13px; color: #4b5563;
}
.report-toolbar label { color: #6b7280; }
.report-toolbar .layui-input.input-sm {
    width: 150px; height: 32px; line-height: 32px; padding: 0 8px; font-size: 13px;
}
.report-toolbar select.layui-input.input-sm { width: 140px; }
.report-sep { color: #9ca3af; }
.report-hint { color: #9ca3af; font-size: 12px; margin-left: 4px; }
/* 勾选框：只改「有没有菲票」的过滤，不是查询条件，所以贴着自己的标签单独成块 */
.report-check {
    display: inline-flex; align-items: center; gap: 5px;
    color: #4b5563; cursor: pointer; user-select: none;
}
.report-check input { margin: 0; vertical-align: middle; }
.report-cards { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.report-card {
    flex: 1 1 190px; border: 1px solid #ebeef5; border-radius: 8px;
    padding: 12px 14px; background: #fafbfc;
}
.report-card .rc-label { font-size: 12px; color: #8b95a1; margin-bottom: 6px; }
.report-card .rc-value { font-size: 20px; font-weight: 600; color: #1f2937; }
.report-card.rc-diff .rc-value { color: #e6a23c; }
.report-table tfoot td { font-weight: 600; background: #f7f8fa; }
/* 数字列右对齐：原来只按 5 个 tbody 的 id 逐个列，s/op/cd 三张表漏掉了，
   同一页里有的表数字靠右、有的靠左，看着就是「字段没对齐」。统一挂到 .ov-table 上。 */
.ov-table td.num { text-align: right; }
/* 表头跟着数据走：数据右对齐而表头左对齐时，表头文字会浮在列的左边，跟数字错开半格 */
.ov-table th.num { text-align: right; }
.neg-amount { color: #f56c6c; }
.no-price { color: #e6a23c; }
/* 工序类型小标：整床单张菲 / 印绣花片飞（报表里区分「不按扎追」的工序） */
.fp-kind { display: inline-block; margin-left: 4px; padding: 0 4px; border-radius: 3px;
    font-size: 11px; line-height: 16px; color: #1e80ff; background: #eaf3ff; vertical-align: 1px; }
.fp-kind.is-print { color: #7a5af8; background: #f1ecff; }
.fp-kind.is-blank { color: #6b7280; background: #f2f3f5; }

/* ---------- 款式列表「工序」列 + 批量配工价弹层 ---------- */
.proc-tag {
    display: inline-block; padding: 0 6px; border-radius: 4px;
    font-size: 12px; line-height: 20px; color: #374151; background: #f2f4f7;
}
.proc-tag.is-empty { color: #b0b3b8; background: #f7f8fa; }
.proc-tag.is-warn { color: #e6a23c; background: #fdf6ec; }
.proc-tag.is-size { color: #1f5fbf; background: #eaf2ff; }
.proc-tag[data-proc-id] { cursor: pointer; }
.proc-tag[data-proc-id]:hover { background: #e2ebf7; color: #1f5fbf; }
.proc-tag.is-empty[data-proc-id]:hover { background: #eef4fd; color: #1f5fbf; }
.name-row { display: flex; align-items: center; gap: 6px; }
.name-row .name-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.name-row .proc-tag { flex: 0 0 auto; }

.spp { display: flex; flex-direction: column; height: 100%; padding: 12px 14px 10px; box-sizing: border-box; }
.spp-head { display: flex; align-items: flex-start; gap: 10px; }
.spp-head-lab { flex: 0 0 auto; font-size: 13px; color: #6b7280; line-height: 24px; }
.spp-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 auto; max-height: 52px; overflow: auto; }
.spp-chip {
    padding: 1px 8px; border-radius: 12px; font-size: 12px; line-height: 22px;
    color: #1f2937; background: #eef2f7; white-space: nowrap;
}
.spp-chip.is-more { color: #8b95a1; background: #f7f8fa; }
.spp-note { font-size: 12px; color: #8b95a1; line-height: 18px; margin: 4px 0 9px; }
.spp-note b { color: #e6a23c; font-weight: 600; }
.spp-link { color: #1e80ff; margin-left: 2px; }
.spp-link:hover { text-decoration: underline; }
.spp-link .layui-icon { font-size: 12px; }
.spp-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.spp-sel {
    height: 32px; padding: 0 8px; font-size: 13px; border: 1px solid #dcdfe6;
    border-radius: 4px; background: #fff; color: #374151; min-width: 230px; max-width: 320px;
    outline: none;
}
.spp-sel:focus { border-color: #1e80ff; }
.spp-input {
    height: 32px; width: 150px; padding: 0 8px; font-size: 13px;
    border: 1px solid #dcdfe6; border-radius: 4px; outline: none;
}
.spp-input:focus { border-color: #1e80ff; }
.spp-table-wrap { flex: 1 1 auto; min-height: 120px; overflow: auto; border: 1px solid #ebeef5; border-radius: 6px; }
.spp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.spp-table th, .spp-table td { padding: 7px 10px; border-bottom: 1px solid #f0f1f3; text-align: left; }
.spp-table th { position: sticky; top: 0; z-index: 1; background: #f7f8fa; color: #4b5563; font-weight: 600; }
.spp-table tbody tr:hover { background: #fafbfc; }
.spp-table tbody tr.is-on { background: #f5f9ff; }
.spp-table tbody tr.is-on:hover { background: #eef5ff; }
.spp-table tbody tr:last-child td { border-bottom: none; }
.spp-table .spp-name { color: #1f2937; }
.spp-table .spp-type { color: #6b7280; }
.spp-table .spp-def { color: #8b95a1; text-align: right; }
.spp-table td:last-child { text-align: right; }
.spp-ck-cell, .spp-table th.spp-c, .spp-table td.spp-c { text-align: center; }
.spp-table th.spp-r { text-align: right; }
.spp-ck, .spp-checkall { width: 15px; height: 15px; vertical-align: middle; accent-color: #1e80ff; cursor: pointer; }
.spp-have {
    display: inline-block; min-width: 40px; text-align: center; border-radius: 4px;
    font-size: 12px; line-height: 20px;
}
.spp-have.is-none { color: #c0c4cc; background: #f7f8fa; }
.spp-have.is-part { color: #e6a23c; background: #fdf6ec; }
.spp-have.is-full { color: #2b9e6b; background: #eefaf3; }
.spp-price {
    width: 104px; height: 30px; padding: 0 8px; font-size: 13px; text-align: right;
    border: 1px solid #dcdfe6; border-radius: 4px; outline: none;
    -moz-appearance: textfield;
}
.spp-price::-webkit-outer-spin-button, .spp-price::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.spp-price:focus { border-color: #1e80ff; box-shadow: 0 0 0 2px rgba(30,128,255,.12); }
.spp-empty { text-align: center; color: #b0b3b8; padding: 26px 0 !important; }
.spp-hint {
    margin-top: 9px; padding: 6px 10px; font-size: 12px; line-height: 18px;
    color: #6b7280; background: #f7f9fc; border: 1px solid #eef2f7; border-radius: 6px;
}
.spp-hint i { margin-right: 4px; color: #9db0c9; }
.spp-foot { display: flex; align-items: center; gap: 10px; padding-top: 9px; flex-wrap: wrap; }
.spp-sum { font-size: 13px; color: #4b5563; margin-right: auto; }
.spp-sum b { color: #1f2937; font-size: 15px; }
.spp-warn { color: #e6a23c; font-size: 12px; margin-left: 4px; }
.spp-modes { display: flex; align-items: center; gap: 12px; font-size: 12px; color: #4b5563; }
.spp-modes label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; white-space: nowrap; }
.spp-modes input { accent-color: #1e80ff; cursor: pointer; }

/* 分码价：开关关着时整列不显示（与款号表单同一口径）；开着才多一格「码价」 */
.spp-no-sz .spp-sz-col { display: none; }
.spp-table td.spp-sz-col, .spp-table th.spp-sz-col { text-align: center; }
.spp-sz {
    padding: 0 7px; height: 26px; font-size: 12px; line-height: 26px; cursor: pointer;
    color: #4b5563; background: #f2f4f7; border: 1px solid transparent; border-radius: 4px;
}
.spp-sz:hover { background: #eaf2ff; color: #1f5fbf; border-color: #cfe0fb; }
.spp-sz b { font-weight: 600; color: #1f5fbf; }
.spp-tier {
    display: inline-flex; align-items: center; gap: 4px; font-size: 12px;
    color: #4b5563; white-space: nowrap; cursor: pointer;
}
.spp-tier input { accent-color: #1e80ff; cursor: pointer; }

/* ---------- 菲票对账（报表第 5 页签）+ 代录弹窗 ---------- */
.report-card.rc-warn .rc-value { color: #e6a23c; }
.report-card.rc-ok .rc-value { color: #16baaa; }

/* 页签上的红点计数（目前只有「收菲异常」用）：有异常才显示，省得没人点进去就发现不了 */
.rp-dot {
    display: inline-block;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    padding: 0 5px;
    margin-left: 4px;
    border-radius: 8px;
    background: #f56c6c;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    vertical-align: 1px;
}
.rp-dot[hidden] { display: none; }

.rec-sub { color: #b0b3b8; font-size: 12px; }
.rec-ok { color: #16baaa; }
.rec-part { color: #e6a23c; }
.rec-wait { color: #c0c4cc; }
/* 一行两个操作（转移/冲减）：不隔开就连成「转移冲减」一个词，td 不 nowrap 的话两个按钮之间还会断行 */
.rec-op { text-align: center; white-space: nowrap; }
.rec-op .rec-btn + .rec-btn { margin-left: 10px; }
.rec-btn { color: #1e80ff; cursor: pointer; }
.rec-btn:hover { text-decoration: underline; }
/* 会动钱的操作（如作废票冲减为 0）用暖色，别和「代录」混成一片蓝 */
.rec-btn-warn { color: #c2410c; }
.rec-st {
    display: inline-block; padding: 0 7px; border-radius: 10px;
    font-size: 12px; line-height: 20px; white-space: nowrap;
}
.rec-st-pending { color: #8b95a1; background: #f4f5f7; }
.rec-st-partial { color: #e6a23c; background: #fdf6ec; }
.rec-st-done { color: #16baaa; background: #eefaf7; }
.rec-st-void { color: #c0c4cc; background: #f7f8fa; text-decoration: line-through; }

.rec-dlg { padding: 12px 16px 4px; box-sizing: border-box; }
.rec-head {
    display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 9px 12px;
    background: #f7f9fc; border: 1px solid #eef2f7; border-radius: 6px;
    font-size: 13px; color: #4b5563;
}
.rec-head b { color: #1f2937; }
.rec-head .rec-code {
    font-family: Consolas, "Courier New", monospace; font-weight: 600; color: #1e80ff;
}
.rec-bar {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    margin: 10px 0; font-size: 13px; color: #4b5563;
}
.rec-bar label { color: #6b7280; }
.rec-bar select, .rec-bar input {
    height: 32px; padding: 0 8px; font-size: 13px; color: #374151;
    border: 1px solid #dcdfe6; border-radius: 4px; outline: none;
}
.rec-bar select { min-width: 132px; }
.rec-bar input[type=text] { width: 210px; }
.rec-bar select:focus, .rec-bar input:focus { border-color: #1e80ff; }
.rec-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rec-table th, .rec-table td {
    padding: 7px 10px; border-bottom: 1px solid #f0f1f3; text-align: left;
}
.rec-table th { background: #f7f8fa; color: #4b5563; font-weight: 600; }
.rec-table tbody tr:last-child td { border-bottom: none; }
.rec-table .rec-r { text-align: right; }
.rec-qty {
    width: 96px; height: 30px; padding: 0 8px; font-size: 13px; text-align: right;
    border: 1px solid #dcdfe6; border-radius: 4px; outline: none;
    -moz-appearance: textfield;
}
.rec-qty::-webkit-outer-spin-button, .rec-qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rec-qty:focus { border-color: #1e80ff; box-shadow: 0 0 0 2px rgba(30,128,255,.12); }
.rec-done { color: #b0b3b8; font-size: 12px; }
.rec-tip {
    margin: 10px 0 6px; padding: 7px 10px; font-size: 12px; line-height: 18px;
    color: #6b7280; background: #f7f9fc; border: 1px solid #eef2f7; border-radius: 6px;
}
.rec-warn { color: #e6a23c; margin-bottom: 4px; }

/* ============ 工序库：批量录入弹窗 ============ */
.pdb { padding: 16px 20px 4px; }
.pdb-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.pdb-bar .layui-btn { margin: 0; }
.pdb-hint { font-size: 12px; color: #8b95a1; line-height: 1.6; flex: 1 1 auto; }
.pdb-hint b { color: #4b5563; font-weight: 600; }
.pdb-text {
    width: 100%; height: 132px; resize: vertical; font-size: 13px; line-height: 22px;
    font-family: Consolas, Menlo, monospace;
}
.pdb-prev-head {
    display: flex; align-items: center; gap: 10px;
    margin: 14px 0 8px; font-size: 13px; font-weight: 600; color: #1f2937;
}
.pdb-count { font-size: 12px; font-weight: 400; color: #8b95a1; }
.pdb-prev {
    max-height: 260px; overflow: auto;
    border: 1px solid #eef2f7; border-radius: 6px; background: #fff;
}
.pdb-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pdb-table th, .pdb-table td { padding: 5px 8px; border-bottom: 1px solid #f2f4f7; }
.pdb-table th {
    position: sticky; top: 0; z-index: 1;
    background: #f7f8fa; color: #4b5563; font-weight: 600; text-align: left;
}
.pdb-table th:nth-child(3), .pdb-table td:nth-child(3) { width: 120px; }
.pdb-table th:nth-child(4), .pdb-table td:nth-child(4) { width: 96px; }
.pdb-table tr:last-child td { border-bottom: none; }
.pdb-table .pdb-i { width: 40px; color: #9aa3ad; text-align: center; }
.pdb-table .layui-input { height: 30px; font-size: 13px; }
.pdb-table input.pdb-price { text-align: right; }
.pdb-st { font-size: 12px; color: #16baaa; }
.pdb-st.is-skip { color: #b0b3b8; }
.pdb-st.is-bad { color: #f56c6c; }
.pdb-empty { padding: 22px 12px; text-align: center; font-size: 12px; color: #b0b3b8; }
.pdb-actions { display: flex; gap: 8px; margin: 14px 0 8px; }
.pdb-actions .layui-btn { margin: 0; }
.pdb-skip { max-height: 220px; overflow: auto; margin-top: 8px; font-size: 12px; line-height: 20px; color: #6b7280; }

/* ===== 报表分页条 =====
   统一放在每张表下方：左边「共 N 行」，右边首页/上下页/页码/每页行数。
   行数是后端给的全量条数，不是当前页的行数——每页都显示「共 50 行」会被当成数据丢了。 */
.rp-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
    padding: 8px 4px 2px;
    font-size: 13px;
    color: #646a73;
}

.rp-bar:empty {
    display: none;
}

.rp-total {
    margin-right: auto;
    color: #909399;
}

.rp-btn {
    height: 28px;
    padding: 0 10px;
    border: 1px solid #dcdfe6;
    background: #fff;
    border-radius: 4px;
    color: #1f2329;
    cursor: pointer;
    font-size: 13px;
    line-height: 26px;
}

.rp-btn:hover:not(:disabled) {
    border-color: #1677ff;
    color: #1677ff;
}

.rp-btn:disabled {
    color: #c0c4cc;
    cursor: not-allowed;
    background: #fafafa;
}

.rp-cur {
    color: #646a73;
}

.rp-cur b {
    color: #1f2329;
}

.rp-size {
    height: 28px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    padding: 0 4px;
    color: #1f2329;
    background: #fff;
    font-size: 13px;
}

/* ===== 组织 / 岗位 / 职务（人事档案） ===== */
/* 卡片标题右侧的补充说明：一句话讲清这个页面会影响什么 */
.card-hint {
    margin-left: 10px;
    font-size: 12px;
    font-weight: 400;
    color: #909399;
}
/* 部门树：箭头浅一点，名称重一点，缩进靠全角空格由 JS 给 */
.dept-branch {
    color: #c0c4cc;
    margin-right: 4px;
}
.dept-name { color: #1f2329; }

/* 职务层级胶囊：决策层深、执行层浅，扫一眼能分层 */
.duty-chip {
    display: inline-block;
    padding: 0 8px;
    line-height: 20px;
    border-radius: 10px;
    font-size: 12px;
    border: 1px solid transparent;
}
.duty-lv1 { color: #8a3ffc; background: #f4ecff; border-color: #e4d4ff; }
.duty-lv2 { color: #1a5fd0; background: #eef4ff; border-color: #d8e6ff; }
.duty-lv3 { color: #5c6470; background: #f4f5f7; border-color: #e8eaed; }

/* 用户列表「性别/年龄」列：性别正体、年龄浅色，两者挨在一起但不抢眼 */
.wk-sex { color: #1f2329; }

/* 生日输入 + 年龄回显：输入框吃掉剩余宽度，年龄固定在右侧 */
.wk-date-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.wk-date-wrap .layui-input { flex: 1 1 auto; }
.wk-age {
    flex: 0 0 auto;
    min-width: 44px;
    font-size: 12px;
    color: #909399;
}

/* 分块标题右侧的小字说明 */
.wk-sep-hint {
    flex: 0 0 auto;
    font-style: normal;
    font-size: 12px;
    color: #b0b6c0;
}

/* ===== 远程搜索下拉（SearchSelect，js/searchselect.js） =====
   替代数据量大的原生 select：聚焦拉最近 20 条，输入走服务端搜索。
   外观对齐 layui 输入框，嵌在筛选栏 / 弹窗表单里都不用额外调。 */
.ss {
    position: relative;
    display: inline-block;
    min-width: 160px;
    vertical-align: middle;
}
.ss .ss-txt {
    width: 100%;
    height: 34px;
    line-height: 34px;
    padding: 0 26px 0 10px;
    border: 1px solid #e6e6e6;
    border-radius: 2px;
    background: #fff;
    font-size: 13px;
    color: #333;
    box-sizing: border-box;
    outline: none;
    cursor: text;
}
.ss .ss-txt::placeholder { color: #b0b6c0; }
.ss .ss-txt:focus { border-color: #16baaa; }
/* 有选中值：左侧补一个实心点，跟空输入区分开 */
.ss.ss-has .ss-txt { color: #333; border-color: #d2d2d2; }
.ss .ss-clear {
    position: absolute;
    right: 6px;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    line-height: 15px;
    text-align: center;
    font-size: 14px;
    color: #c2c2c2;
    cursor: pointer;
    display: none;
}
.ss.ss-has:hover .ss-clear { display: block; }
.ss .ss-clear:hover { color: #ff5722; }
/* 面板：盖在 layui 弹层之上（layer 的 z-index 是 19891014） */
.ss .ss-pop {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 4px;
    z-index: 19891015;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 2px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
    min-width: 220px;
}
.ss.ss-open .ss-pop { display: block; }
.ss.ss-up .ss-pop { top: auto; bottom: 100%; margin-top: 0; margin-bottom: 4px; }
.ss .ss-list { max-height: 240px; overflow-y: auto; }
.ss .ss-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 7px 10px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    line-height: 1.4;
}
.ss .ss-item.active { background: #f2fbf9; }
.ss .ss-lab { flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss .ss-sub { flex: 1 1 auto; min-width: 0; font-size: 12px; color: #909399;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.ss .ss-empty { padding: 14px 10px; text-align: center; font-size: 12px; color: #909399; }
.ss.ss-disabled { opacity: .6; pointer-events: none; }

/* 筛选栏里的紧凑版 */
.report-toolbar .ss { min-width: 150px; }
.report-toolbar .ss .ss-txt { height: 30px; line-height: 30px; padding: 0 24px 0 8px; font-size: 13px; }
.list-toolbar .ss { min-width: 180px; }
/* 弹窗表单里跟其他控件一样撑满 */
.mf-cell .ss, .mf-row .ss { display: block; width: 100%; }

/* 多选模式：已选项做成 chip 排在输入框上方，翻页/再搜都不会丢 */
.ss.ss-multi { display: block; }
.ss .ss-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ss .ss-chips:not(:empty) { margin-bottom: 6px; }
.ss .ss-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 4px 2px 8px;
    background: #f2fbf9;
    border: 1px solid #cdeee7;
    border-radius: 2px;
    font-size: 12px;
    color: #0f8f84;
    line-height: 18px;
}
.ss .ss-chip-x { font-style: normal; cursor: pointer; color: #8ec5be; }
.ss .ss-chip-x:hover { color: #ff5722; }
/* 物料「加载更多」按钮占一行 */
.mp-more { padding: 10px 0 4px; text-align: center; }

/* 裁单页「款号」格：搜索下拉顶满单元格，高度与其他编辑格一致（42px、无边框） */
.ov-value-edit .ss { display: block; width: 100%; }
.ov-value-edit .ss .ss-txt {
    height: 42px;
    line-height: 42px;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0 26px 0 14px;
    font-size: 13px;
    color: #1f2329;
}
.ov-value-edit .ss .ss-pop { left: 0; right: auto; min-width: 320px; }

/* 角色「可见人员」：从勾选框列表改成搜索多选后，容器不再需要滚动框
   （overflow:auto 会把下拉面板裁掉，chips 也要能自然撑高弹层） */
.scope-pick {
    max-height: none;
    overflow: visible;
    padding: 0;
    border: 0;
    background: transparent;
}

/* ===== 用料清单（BOM）弹层 =====
   两种算量方式在同一张表里切换：手工填单件用量，或按唛架「唛架长 ÷ 一床件数」推算。
   显隐靠行上的 data-mode，不用 JS 一个个改 display，切换时少一类状态不同步。

   视觉目标是「一张可编辑的表」，不是「一堆输入框」：输入默认无边框、跟底色融在一起，
   hover 才浮出边框、focus 才有主色环。十几行料排下来，看到的是表格而不是控件墙。 */

.bom-wrap {
    box-sizing: border-box; height: 100%;
    display: flex; flex-direction: column;
    padding: 14px 16px 0; overflow: hidden;
    color: #1f2329; font-size: 13px;
}

/* 中间这段是唯一的滚动区：表格、加行按钮、算料结果都在里面滚，
   顶部的款号信息条固定不动，底部的保存/算料按钮属于层、不在滚动区内，
   所以永远不会被内容顶出屏幕。 */
.bom-main {
    flex: 1 1 auto; min-height: 0;
    overflow-y: auto; overflow-x: hidden;
    padding-bottom: 8px;
}

/* 顶部：款号 / 颜色 / 件数。做成浅色信息条，跟下面的表格分开，不抢表格的注意力。
   左右内边距跟表格单元一致（10px），款号文字才会跟「物料」表头在同一条竖线上。 */
.bom-top {
    flex: 0 0 auto;
    display: flex; align-items: center; gap: 30px;
    margin: 0 0 12px; padding: 10px;
    background: linear-gradient(90deg, #f2fbf9 0%, #f8fafb 100%);
    border: 1px solid #e3f0ed; border-radius: 6px;
}
.bom-kv { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bom-kv span { font-size: 12px; color: #8a8f99; }
.bom-kv b {
    font-size: 15px; font-weight: 600; color: #1f2329;
    letter-spacing: .2px; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}
.bom-kv b.bom-accent { color: #0f8f84; font-variant-numeric: tabular-nums; }
.bom-top-right { margin-left: auto; font-size: 12px; color: #9aa0aa; white-space: nowrap; }

/* 表格外壳只负责边框圆角；滚动交给 .bom-main，避免「层滚 + 表滚」两层滚动条打架。
   这里不能写 overflow:hidden——它会让本元素变成新的滚动祖先，表头 sticky 就失效了 */
.bom-scroll {
    border: 1px solid #eef0f2; border-radius: 6px;
}
.bom-calc .bom-scroll { max-height: none; border: none; border-radius: 0; }
.bom-table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.bom-table thead th:first-child { border-top-left-radius: 6px; }
.bom-table thead th:last-child { border-top-right-radius: 6px; }
.bom-table th {
    position: sticky; top: 0; z-index: 2;
    background: #f7f8fa; color: #6b7280;
    font-weight: 500; font-size: 12px; text-align: left;
    padding: 8px 10px; border-bottom: 1px solid #e6e8eb; white-space: nowrap;
}
.bom-table td { padding: 6px 10px; border-bottom: 1px solid #f2f3f5; vertical-align: middle; }
.bom-table tbody tr:last-child td { border-bottom: none; }
.bom-table tbody tr:hover { background: #fbfcfd; }
.bom-calc .bom-table th { position: static; }

/* 行内控件：默认融进底色，靠 hover/focus 才显出可编辑 */
.bom-table input, .bom-table select {
    width: 100%; height: 30px; box-sizing: border-box;
    border: 1px solid transparent; border-radius: 4px;
    padding: 0 7px; font-size: 13px; color: #1f2329;
    background: #f5f6f8; transition: background .15s, border-color .15s, box-shadow .15s;
}
.bom-table input::placeholder { color: #b6bac2; }
.bom-table input:hover, .bom-table select:hover { background: #fff; border-color: #dcdfe6; }
.bom-table input:focus, .bom-table select:focus {
    background: #fff; border-color: #0f8f84; outline: none;
    box-shadow: 0 0 0 2px rgba(15, 143, 132, .12);
}
.bom-table input[type=number] { text-align: right; font-variant-numeric: tabular-nums; }
.bom-table .bom-num { text-align: right; font-variant-numeric: tabular-nums; }
.bom-table .c-mode select { text-align: center; padding: 0 2px; font-size: 12px; }

/* 按唛架：唛架长 ÷ 件/床，右边直接跟结果，比原来两行更省高度、也更容易核对 */
.bom-marker { display: none; }
.bom-table tr[data-mode="MARKER"] .bom-qty { display: none; }
.bom-table tr[data-mode="MARKER"] .bom-marker { display: block; }
.bom-mk { display: flex; align-items: center; gap: 5px; }
.bom-mk input { text-align: center; }
.bom-mk .bom-mlen { flex: 0 0 64px; padding: 0 4px; }
.bom-mk .bom-ppc { flex: 0 0 44px; padding: 0 4px; }
.bom-mk .bom-sym { flex: 0 0 8px; text-align: center; color: #b6bac2; font-size: 12px; }
.bom-mk .bom-per {
    flex: 1 1 auto; min-width: 0; color: #0f8f84;
    font-size: 12px; font-weight: 500;
    font-variant-numeric: tabular-nums; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}
.bom-mk .bom-per.bom-per-empty { color: #b6bac2; font-weight: 400; }

/* 损耗：百分号做后缀，避免用户填「5%」被当成非数字 */
.bom-suffix { position: relative; }
.bom-suffix input { padding-right: 18px; }
.bom-suffix span {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    color: #9aa0aa; font-size: 12px; pointer-events: none;
}

.bom-table .c-op { text-align: center; }
.bom-del { color: #cfd3d8; font-size: 15px; line-height: 1; transition: color .15s; }
.bom-del:hover { color: #e05b5b; }

/* 空状态：给个图标和下一步，比一行灰字更像「这里还没开始」而不是「坏了」 */
.bom-empty-box { padding: 26px 0 22px; text-align: center; color: #9aa0aa; }
.bom-empty-box i { display: block; font-size: 26px; color: #d4d8dd; margin-bottom: 8px; }
.bom-empty-box p { margin: 0 0 4px; font-size: 13px; color: #6b7280; }
.bom-empty-box span { font-size: 12px; }

/* 底部操作条：虚线框按钮，读起来是「加一行」而不是主操作 */
.bom-foot { display: flex; align-items: center; gap: 14px; padding: 12px 0 2px; }
.bom-add {
    display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto;
    height: 32px; padding: 0 14px; border: 1px dashed #b8d8d3;
    border-radius: 4px; color: #0f8f84; background: #f7fcfb; font-size: 13px;
}
.bom-add:hover { border-color: #0f8f84; background: #f2fbf9; }
.bom-add i { font-size: 12px; }
.bom-tip { color: #9aa0aa; font-size: 12px; line-height: 1.6; }

/* 算料结果：先给三个数（件数/材料成本/缺料），再列明细，最后一行合计 */
.bom-calc { margin-top: 16px; }
.bom-calc-card { border: 1px solid #eef0f2; border-radius: 6px; overflow: hidden; }
.bom-calc-head {
    display: flex; align-items: center; gap: 32px; flex-wrap: wrap;
    padding: 11px 14px; background: #f8fafb; border-bottom: 1px solid #eef0f2;
}
.bom-kpi { display: flex; align-items: baseline; gap: 6px; }
.bom-kpi span { font-size: 12px; color: #8a8f99; }
.bom-kpi b { font-size: 15px; font-weight: 600; color: #1f2329; font-variant-numeric: tabular-nums; }
.bom-kpi b.bom-accent, .bom-ok { color: #0f8f84; }
.bom-kpi b.bom-warn, .bom-short { color: #e05b5b; }
.bom-calc-note { margin-left: auto; font-size: 12px; color: #9aa0aa; }

/* 缺料旁边直接给出口：算完料看见差多少，下一步就是去买，不该再让人翻菜单找采购 */
.bom-to-po {
    padding: 5px 12px; font-size: 12px; line-height: 18px; color: #c0392b;
    background: #fff; border: 1px solid #f0b8b0; border-radius: 4px; cursor: pointer;
}
.bom-to-po:hover { background: #fdf2f0; border-color: #e05b5b; }

/* 按缺口建采购单弹层 */
.bom-po-box { padding: 14px 16px; font-size: 13px; color: #1f2329; }
.bom-po-tip { color: #6b7280; line-height: 1.7; margin-bottom: 12px; }
/* 顶部「统一指定」工具条：选一次可一键铺到所有行，逐行仍可单独改 */
.bom-po-bar {
    display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
    padding: 8px 10px; background: #f8fafb; border: 1px solid #eef0f2; border-radius: 6px;
}
.bom-po-bar label { flex: none; color: #606266; }
.bom-po-bar select {
    flex: 0 0 240px; height: 32px; padding: 0 8px; border: 1px solid #dfe3e8;
    border-radius: 4px; background: #fff; font-size: 13px; color: #1f2329;
}
.bom-po-apply {
    height: 32px; padding: 0 12px; border: 1px solid #d7dbe0; border-radius: 4px;
    background: #fff; color: #1f2329; font-size: 13px; cursor: pointer;
}
.bom-po-apply:hover { border-color: #1f5fbf; color: #1f5fbf; }
.bom-po-scroll { border: 1px solid #eef0f2; border-radius: 6px; overflow: auto; }
.bom-po-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bom-po-table th {
    position: sticky; top: 0; z-index: 1; padding: 8px 10px; text-align: left;
    background: #f8fafb; color: #6b7280; font-weight: 500;
    border-bottom: 1px solid #eef0f2; white-space: nowrap;
}
.bom-po-table td { padding: 8px 10px; border-bottom: 1px solid #f5f6f8; }
.bom-po-table tr:last-child td { border-bottom: none; }
.bom-po-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bom-po-spec { color: #9aa0aa; margin-left: 6px; font-size: 12px; }
.bom-po-matname { color: #1f2329; }
.bom-po-had { color: #9aa0aa; font-size: 12px; margin-top: 2px; }
.bom-po-unit { color: #9aa0aa; margin-left: 4px; font-size: 12px; }
.bom-po-sup select {
    width: 100%; height: 30px; padding: 0 6px; border: 1px solid #dfe3e8;
    border-radius: 4px; background: #fff; font-size: 13px; color: #1f2329;
}
.bom-po-sup select:focus { border-color: #1f5fbf; outline: none; }
.bom-po-table tr.bom-po-err td { background: #fff1f0; }
.bom-po-table tr.bom-po-err .bom-po-sup select { border-color: #e05b5b; }
.bom-po-sum { margin-top: 10px; color: #606266; font-size: 13px; }
.bom-po-sum b { color: #1f5fbf; }
.bom-po-sum.is-warn { color: #d48806; }
.bom-po-sum.is-warn b { color: #d48806; }
.bom-po-warn { margin-top: 10px; color: #b8860b; font-size: 12px; line-height: 1.6; }

.bom-spec { color: #9aa0aa; margin-left: 6px; font-size: 12px; }
.bom-tag {
    display: inline-block; padding: 0 6px; line-height: 18px;
    font-size: 12px; border-radius: 3px; white-space: nowrap;
}
.bom-tag-manual { background: #f2f3f5; color: #6b7280; }
.bom-tag-marker { background: #eaf7f5; color: #0f8f84; }
.bom-sub { color: #9aa0aa; font-size: 12px; margin-left: 4px; font-variant-numeric: tabular-nums; }
.bom-total td { background: #fafbfc; font-weight: 600; border-top: 1px solid #eef0f2; }

/* ===== 质检登记弹窗（qc-form.js，质检列表与订单列表共用） ===== */
.qc-form { padding: 16px 20px 0 0; }
/* 弹窗一行两列：label 右对齐（文字贴着自己那格的右缘、跟输入框留 12px 空），
   右侧输入框左对齐。label 占位 = 96 + 12 = 108，input-block 的 margin-left 必须同值 */
.qc-form .form-grid-2 .layui-form-label {
    width: 96px; text-align: right; padding: 9px 12px 9px 0;
}
.qc-form .form-grid-2 .layui-input-block { margin-left: 108px; }
/* 弹窗里的搜索下拉（裁单/次品原因/严重程度）必须和普通输入框同高同宽：
   .ss 默认 34px 高、inline-block 只撑 160px，混在 38px 的 layui-input 里
   行高不齐、框宽参差，整个弹窗看着歪。display:block 让它吃满输入区宽度。 */
.qc-form .form-grid-2 .ss { display: block; }
.qc-form .form-grid-2 .ss .ss-txt { height: 38px; line-height: 38px; }
.qc-form-tip {
    color: #a0a6ae; font-size: 12px; line-height: 1.5;
    padding: 0 0 2px 108px; margin-bottom: 12px;
}
/* 必填红星：qc-req（裁单方案单）、os-req（外发单）、pg-req（采购单）、req（通用）。
   三个带前缀的是历史各自起的名，统一在这里点亮，新的表单一律用 .req */
.qc-req::after, .os-req::after, .pg-req::after, .req::after { content: " *"; color: #d93025; font-weight: 600; }

/* ===== 整床快捷出票弹窗（cut-sheet.js quickWholeBedDialog） =====
   4 个字段的窄弹窗，一行一列：标签右对齐贴住输入框左缘，输入框等宽，
   说明文字收进顶部浅色卡片，不再用 108px 缩进假装对齐两列栅格。 */
.qt-form { padding: 2px 24px 0 2px; }
.qt-form .layui-form-item { margin-bottom: 14px; }
/* label 占位 = 84 + 12 = 96，input-block 的 margin-left 必须同值 */
.qt-form .layui-form-label {
    width: 84px; text-align: right; padding: 9px 12px 9px 0;
}
.qt-form .layui-input-block { margin-left: 96px; }
.qt-form .layui-input { height: 38px; }
.qt-form .qt-tip {
    margin: 6px 0 16px; padding: 10px 12px;
    background: #f6f8fa; border: 1px solid #eceff2; border-radius: 8px;
    color: #737c88; font-size: 12px; line-height: 1.65;
}
.qt-form .qt-tip b { color: #4c5561; font-weight: 600; }
.qt-form .qt-hint {
    margin-top: 4px; color: #9aa0aa; font-size: 12px; line-height: 1.5;
}
/* 搜索下拉在单列里跟输入框同宽同高，否则比旁边的 input 矮一截 */
.qt-form .ss { display: block; }
.qt-form .ss .ss-txt { height: 38px; line-height: 38px; }

/* ============================================================
   表单格式统一（甲方 2026-11-14 口径）：
   1) label 文字右对齐 —— 靠住右边控件，layui-form-pane 下默认居中，
      这里覆盖回右对齐；
   2) 表单元素左对齐 —— 指控件本身一行靠左起（input-block 不缩进多余留白），
      文本框 / 文本域 / 下拉 / 开关里的内容一律左起，**不做内容右对齐**。
      甲方原话：「label 文字右对齐，表单元素左对齐，不是说里面内容右对齐」。
   只作用于表单项（.layui-form-item / .layui-form-pane），
   列表查询工具栏的输入框不在 .layui-form-item 里，不受影响。
   表格里的数字/金额列仍各自右对齐，不在本段管辖范围。
   ============================================================ */
.layui-form-pane .layui-form-label { text-align: right; }
.layui-form-item .layui-input,
.layui-form-item .layui-textarea,
.layui-form-item .layui-select,
.layui-form-item select { text-align: left; }
/* 自定义弹窗表单（.modal-form/.mf-label）：label 右对齐，控件与内容左对齐 */
.modal-form .layui-input,
.modal-form .layui-textarea,
.modal-form select { text-align: left; }
/* ov 网格表单（裁单/订单/成本编辑页）：label 居中改右对齐；控件内容左对齐 */
.ov-label { justify-content: flex-end; padding-right: 10px; box-sizing: border-box; }
.ov-value-edit .layui-input,
.ov-value-edit textarea,
.ov-value-edit select { text-align: left; }


/* ===== 授权提示条（挂在 .app-nav 内部，所有 PC 页面自动生效） =====
   正常授权时这个元素根本不渲染；出现时它属于 nav（fixed定位）的一部分，
   所以要靠 body.lic-on 把 .layui-body 的 top 从 102px 往下推，
   推多少由 nav 里的脚本按实际高度写进 --lic-h，文字换行也不会压住表头。 */
.lic-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    font-size: 13px;
    line-height: 1.45;
    background: #fffbe6;
    color: #874d00;
    border-top: 1px solid #ffe58f;
    box-sizing: border-box;
}

.lic-banner.is-error {
    background: #fff1f0;
    color: #a8071a;
    border-top-color: #ffccc7;
}

.lic-banner .lic-ico { font-size: 14px; flex: none; }

.lic-banner .lic-title { font-weight: 600; flex: none; }

.lic-banner .lic-msg { flex: 1 1 auto; min-width: 0; }

.lic-banner .lic-msg b { font-weight: 600; }

.lic-banner .lic-close {
    flex: none;
    margin-left: 4px;
    padding: 0 6px;
    font-size: 16px;
    line-height: 1;
    color: inherit;
    opacity: .55;
    text-decoration: none;
}

.lic-banner .lic-close:hover { opacity: 1; }

body.lic-on .layui-body { top: var(--lic-h, 136px); }

/* ===== 可搜索下拉（裁床明细 颜色/码数） =====
   原生 select 仍存档取值（保存/校验逻辑不受影响），只是隐藏掉，
   上面盖一个能打字的输入框；面板 fixed 定位，表格滚动也不被裁切。 */
.ss-wrap { position: relative; display: inline-block; width: 100%; }
.ss-wrap > select {
    position: absolute; left: 0; top: 0; width: 100%; height: 100%;
    opacity: 0; pointer-events: none;
}
.ss-wrap > .ss-input {
    height: 32px; line-height: 32px;
    padding: 0 18px 0 6px;
    text-overflow: ellipsis;
}
.ss-wrap::after {
    content: ''; position: absolute; right: 7px; top: 50%; margin-top: -2px;
    border-left: 4px solid transparent; border-right: 4px solid transparent;
    border-top: 5px solid #8a919c; pointer-events: none;
}
.ss-panel {
    position: fixed; z-index: 20000000;
    background: #fff; border: 1px solid #d9dde3; border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
    max-height: 240px; overflow-y: auto; padding: 4px;
}
.ss-item {
    padding: 5px 10px; font-size: 13px; color: #1f2329; border-radius: 5px;
    cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ss-item:hover, .ss-item.active { background: #eef4ff; color: #1d6fd4; }
.ss-empty { padding: 8px 10px; font-size: 12px; color: #8a919c; }

/* 识别核对层：没填好的行（点「追加进明细」后标出来；!important 压过 .ocr-warn-row 的标黄） */
.ocr-bad-row > td { background: #fff2f0 !important; }
.ocr-bad-row > td:first-child::before { background: #f5222d; }
