/* ============================================================
   QMS 质量管理系统 - 全局样式
   基于 Bootstrap 5，只补充侧边栏布局与看板所需的少量自定义样式

   字号规范（全站统一刻度，务必遵守）
   ------------------------------------------------
   --qms-fs-xs    12px   徽标/角标/小标签/提示/次要单位/页脚
   --qms-fs-sm    13px   表格、侧边栏、表单控件、小按钮、时间线
   --qms-fs-base  14px   正文、面板标题、表单标签、按钮、下拉项
   --qms-fs-title 16px   页面标题
   展示型数字（看板大数）单独用 27px
   ------------------------------------------------
   ============================================================ */

:root {
    --qms-sidebar-w: 236px;
    --qms-navy: #12395f;
    --qms-navy-dark: #0d2b48;
    --qms-navy-light: #1c4f7c;
    --qms-primary: #1F4E79;      /* 品牌蓝：浮层顶边 / 导出表头统一色 */
    --qms-bar: #1E7BBB;          /* 表单分区蓝条 / 分区分隔线 / 单据外框（对齐参考单据） */
    --qms-cell-label: #D9E7F5;   /* 表单标签单元格浅蓝底 */
    --qms-cell-value: #FCF6E0;   /* 表单值单元格米黄底 */
    --qms-grid-line: #9CC2E0;    /* 表格网格线（单元格边框） */
    --qms-accent: #2f8fd8;
    --qms-page-bg: #f4f6f9;
    --qms-border: #e3e7ee;

    /* 全站统一字号刻度 */
    --qms-fs-xs: 12px;
    --qms-fs-sm: 13px;
    --qms-fs-base: 14px;
    --qms-fs-title: 16px;
}

body {
    background: var(--qms-page-bg);
    font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, sans-serif;
    font-size: var(--qms-fs-base);
    color: #22303f;
}

/* ---------------- 整体骨架 ---------------- */
.app-shell {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: var(--qms-sidebar-w);
    flex: 0 0 var(--qms-sidebar-w);
    background: var(--qms-navy);
    color: #cfe0f0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    scrollbar-width: thin;
}

.app-sidebar::-webkit-scrollbar { width: 6px; }
.app-sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .22); border-radius: 3px; }

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 18px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--qms-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--qms-fs-base);
    letter-spacing: .5px;
}

.brand-text { line-height: 1.25; }
.brand-text strong { display: block; color: #fff; font-size: var(--qms-fs-base); font-weight: 600; }
.brand-text span { font-size: var(--qms-fs-xs); color: #8fb4d4; letter-spacing: .6px; }

.side-nav { padding: 10px 10px 30px; }

.side-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 7px;
    color: #cfe0f0;
    text-decoration: none;
    font-size: var(--qms-fs-sm);
    transition: background .12s, color .12s;
}

.side-link:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.side-link.active { background: var(--qms-accent); color: #fff; font-weight: 500; }
.side-link .ico { opacity: .85; font-size: var(--qms-fs-sm); width: 14px; text-align: center; }

.side-group { margin-top: 6px; }

.side-group > summary {
    list-style: none;
    cursor: pointer;
    padding: 8px 12px;
    color: #9dc0dc;
    font-size: var(--qms-fs-sm);
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 7px;
    user-select: none;
}

.side-group > summary::-webkit-details-marker { display: none; }
.side-group > summary:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.side-group > summary .caret { margin-left: auto; font-size: 10px; opacity: .7; transition: transform .15s; }
.side-group[open] > summary .caret { transform: rotate(90deg); }
.side-group[open] > summary { color: #fff; }

.side-sub { padding: 2px 0 4px 10px; }
.side-sub .side-link { padding: 6px 10px; font-size: var(--qms-fs-sm); }

.side-divider { height: 1px; background: rgba(255, 255, 255, .09); margin: 10px 12px; }

/* ---------------- 主区域 ---------------- */
.app-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-topbar {
    background: #fff;
    border-bottom: 1px solid var(--qms-border);
    padding: 0 22px;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 14px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.app-topbar .page-title { font-size: var(--qms-fs-title); font-weight: 600; color: #1b2b3d; margin: 0; line-height: 1.3; }
/* 面包屑：中间层级可点，末级为当前位置（纯文本）。
   常驻一条淡色下划线作为可点线索——只靠 hover 变色，静态页面看不出
   哪一段能点；末级不加，避免整行都像链接。 */
/* 面包屑中间层是链接：用品牌蓝 + 实线下划线，保证一眼能看出"这里能点"。
   早先用 inherit + 极淡下划线（#C6D4E1），实测在 16px 粗体标题里几乎看不出来，
   等于把链接做成了纯文本。 */
.app-topbar .page-title .crumb-link {
    color: #1F4E79;
    text-decoration: underline;
    text-decoration-color: #8FB4D2;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.app-topbar .page-title .crumb-link:hover,
.app-topbar .page-title .crumb-link:focus-visible {
    color: var(--qms-accent);
    text-decoration-color: currentColor;
    text-decoration-thickness: 2px;
}
.app-topbar .page-title .crumb-sep { color: #A8B6C4; font-weight: 400; margin: 0 .22em; }
.app-topbar .page-title .crumb-cur { color: #1b2b3d; }
.app-topbar .page-desc { font-size: var(--qms-fs-xs); color: #7b8794; margin: 0; }

.app-content { padding: 20px 22px 40px; }

/* ---------------- 卡片与表格 ---------------- */
.panel {
    background: #fff;
    border: 1px solid var(--qms-border);
    border-radius: 10px;
    overflow: hidden;
}

.panel-head {
    padding: 13px 16px;
    border-bottom: 1px solid var(--qms-border);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.panel-head h2 { font-size: var(--qms-fs-base); font-weight: 600; margin: 0; color: #1b2b3d; }
/* 下拉菜单展开期间临时解除面板裁剪，否则菜单会被 overflow:hidden 切掉
   （class 由 js/more-menu.js 在 show/hidden 事件里加解） */
.panel.menu-open { overflow: visible; }

.panel-body { padding: 16px; }

.table-wrap { overflow-x: auto; }

/* 浮动横向滚动条：长表格不用滚到底部也能左右拖（js/sticky-hscroll.js 控制显隐与位置） */
.float-hscroll {
    position: fixed;
    bottom: 0;
    z-index: 1035;
    height: 15px;
    display: none;
    background: rgba(28, 79, 124, .10);
    border-top: 1px solid rgba(28, 79, 124, .22);
    border-radius: 6px 6px 0 0;
    box-shadow: 0 -2px 8px rgba(15, 40, 70, .10);
    cursor: pointer;
}

.float-hscroll-thumb {
    position: absolute;
    top: 2px;
    left: 0;
    height: 11px;
    width: 48px;
    border-radius: 6px;
    background: rgba(28, 79, 124, .45);
    cursor: grab;
    touch-action: none;
    transition: background .12s ease;
}

.float-hscroll-thumb:hover { background: rgba(28, 79, 124, .66); }
.float-hscroll-thumb.dragging {
    background: rgba(28, 79, 124, .78);
    cursor: grabbing;
}

@media print { .float-hscroll { display: none !important; } }

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--qms-fs-sm);
    white-space: nowrap;
}

.data-table thead th {
    background: #f7f9fc;
    color: #55657a;
    font-weight: 600;
    font-size: var(--qms-fs-sm);
    padding: 10px 12px;
    border-bottom: 1px solid var(--qms-border);
    text-align: left;
    position: sticky;
    top: 0;
}

/* 流程型资源的「步骤分组表头」（DFMEA/PFMEA 七步法）：
   分组行不吸顶，滚动时让位给下面的字段名行，避免两行 sticky 重叠 */
.data-table thead tr.step-head th {
    position: static;
    background: #e8f1fa;
    color: #12496f;
    font-size: var(--qms-fs-xs);
    font-weight: 700;
    letter-spacing: .3px;
    text-align: center;
    padding: 5px 8px;
    border-bottom: 1px solid #cfe0ef;
    border-right: 1px solid #d6e4f1;
}
.data-table thead tr.step-head th.step-corner {
    background: #f7f9fc;
    color: #7b8794;
    font-weight: 500;
    letter-spacing: 0;
}
.data-table thead tr.step-head th.step-empty { background: transparent; }

.data-table tbody td {
    padding: 9px 12px;
    border-bottom: 1px solid #f0f3f7;
    vertical-align: middle;
}

.data-table tbody tr:hover { background: #f9fbfd; }
.data-table tbody tr:last-child td { border-bottom: none; }
.cell-code { font-family: Consolas, "Courier New", monospace; color: var(--qms-navy-light); font-weight: 500; }
.cell-ellipsis { max-width: 280px; overflow: hidden; text-overflow: ellipsis; }

.empty-state { padding: 54px 20px; text-align: center; color: #93a1b0; }
.empty-state .glyph { font-size: 30px; opacity: .35; margin-bottom: 10px; }

/* ---------------- 看板 ---------------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
    gap: 14px;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--qms-border);
    border-radius: 10px;
    padding: 15px 16px;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: border-color .15s, transform .15s;
}

.stat-card:hover { border-color: var(--qms-accent); transform: translateY(-1px); }
.stat-card .stat-name { font-size: var(--qms-fs-sm); color: #55657a; display: flex; align-items: center; gap: 7px; }
.stat-card .stat-main { font-size: 27px; font-weight: 600; color: #12395f; margin: 8px 0 2px; line-height: 1.1; }
.stat-card .stat-sub { font-size: var(--qms-fs-xs); color: #7b8794; }
.stat-card .stat-sub b { color: #d1743a; font-weight: 600; }

.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; font-size: var(--qms-fs-sm); }
.bar-row .bar-label { width: 78px; flex: 0 0 78px; color: #55657a; }
.bar-row .bar-track { flex: 1 1 auto; height: 9px; background: #eef2f7; border-radius: 5px; overflow: hidden; }
.bar-row .bar-fill { height: 100%; background: var(--qms-accent); border-radius: 5px; }
.bar-row .bar-value { width: 74px; text-align: right; flex: 0 0 74px; color: #55657a; }

.alert-list { list-style: none; margin: 0; padding: 0; }
.alert-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid #f0f3f7;
    font-size: var(--qms-fs-sm);
}
.alert-list li:last-child { border-bottom: none; }
.alert-list .meta { margin-left: auto; font-size: var(--qms-fs-xs); color: #7b8794; white-space: nowrap; }

/* ---------------- 登录页 ---------------- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(140deg, #12395f 0%, #1c4f7c 55%, #2f8fd8 100%);
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 392px;
    background: #fff;
    border-radius: 14px;
    padding: 32px 30px 26px;
    box-shadow: 0 18px 44px rgba(9, 32, 56, .26);
}

.login-card .brand-line { display: flex; align-items: center; gap: 11px; margin-bottom: 22px; }
.login-card h1 { font-size: 18px; font-weight: 600; margin: 0; color: #12395f; }
.login-card .sub { font-size: var(--qms-fs-xs); color: #8b98a8; margin-top: 2px; }

/* 登录页备案号：深蓝渐变底上用半透明白字，固定贴底不随卡片高度浮动 */
.login-foot {
    position: fixed;
    left: 0; right: 0; bottom: 14px;
    padding: 0 16px;
    text-align: center;
    font-size: var(--qms-fs-sm);
    line-height: 1.5;
}
.login-foot a {
    color: rgba(255, 255, 255, .85);
    text-decoration: none;
}
.login-foot a:hover { color: #fff; text-decoration: underline; }

/* 登录后页面底部备案号：margin-top:auto 让短页面也能沉到内容区底部 */
.app-icp {
    margin-top: auto;
    padding: 8px 22px 14px;
    text-align: center;
    font-size: var(--qms-fs-xs);
    color: #93a1b0;
}
.app-icp a { color: #93a1b0; text-decoration: none; }
.app-icp a:hover { color: var(--qms-bar); text-decoration: underline; }

/* ---------------- 杂项 ---------------- */
.form-label { font-size: var(--qms-fs-sm); color: #55657a; font-weight: 500; margin-bottom: 4px; }
.form-label .req { color: #d9534f; margin-left: 2px; }
.form-hint { font-size: var(--qms-fs-xs); color: #93a1b0; margin-top: 3px; }
.req-note { font-size: var(--qms-fs-xs); color: #93a1b0; }

/* ---------------- 详情页只读字段 ---------------- */
.detail-label {
    font-size: var(--qms-fs-xs);
    color: #93a1b0;
    margin-bottom: 2px;
}

.detail-value {
    font-size: var(--qms-fs-base);
    color: #2c3a4d;
    word-break: break-all;
}

/* 长文本（备注、审核发现等）保留换行，避免一长串糊满一行 */
.detail-pre {
    white-space: pre-wrap;
    line-height: 1.55;
    max-height: 220px;
    overflow-y: auto;
    padding: 8px 10px;
    background: #f7f9fb;
    border: 1px solid var(--qms-border, #e4e9f0);
    border-radius: 6px;
}

.page-foot { padding: 12px 16px; border-top: 1px solid var(--qms-border); background: #fafbfd; }

/* ---------------- 审批流 ---------------- */
.wf-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

.wf-step {
    font-size: var(--qms-fs-xs);
    padding: 4px 12px;
    border-radius: 20px;
    background: #eef2f7;
    color: #7b8794;
    border: 1px solid #e2e8f0;
}

.wf-step.active {
    background: var(--qms-primary, #1c4f7c);
    color: #fff;
    border-color: var(--qms-primary, #1c4f7c);
    font-weight: 600;
}

.wf-arrow { color: #b7c2ce; font-size: var(--qms-fs-xs); }

/* 审批历史时间线 */
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; position: relative; }
.timeline::before {
    content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px;
    width: 2px; background: #e2e8f0;
}
.timeline > li { position: relative; padding: 0 0 16px 14px; }
.timeline > li:last-child { padding-bottom: 0; }
.tl-dot {
    position: absolute; left: -18px; top: 4px;
    width: 10px; height: 10px; border-radius: 50%;
    background: #fff; border: 2px solid var(--qms-primary, #1c4f7c);
}
.tl-body { font-size: var(--qms-fs-sm); line-height: 1.6; }
.tl-comment {
    margin-top: 4px; padding: 6px 10px; font-size: var(--qms-fs-sm); color: #55657a;
    background: #f6f8fb; border-left: 3px solid #d7dfe8; border-radius: 0 4px 4px 0;
    white-space: pre-wrap;
}

/* ---------------- 报表中心 ---------------- */
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 14px; }
.report-card {
    display: block; padding: 16px 18px; border: 1px solid var(--qms-border);
    border-radius: 10px; background: #fff; text-decoration: none; color: inherit;
    transition: box-shadow .15s, border-color .15s;
}
.report-card:hover { box-shadow: 0 6px 18px rgba(20, 45, 75, .10); border-color: #b7cfe6; }
.report-card h3 { font-size: var(--qms-fs-base); margin: 0 0 6px; color: #1c3550; }
.report-card p { font-size: var(--qms-fs-sm); color: #7b8794; margin: 0 0 10px; min-height: 34px; }
.report-card .meta { font-size: var(--qms-fs-xs); color: #93a1b0; }

/* ---------------- 侧边栏待办角标 ---------------- */
.side-badge {
    margin-left: auto;
    background: #e7433f; color: #fff;
    font-size: var(--qms-fs-xs); font-weight: 600;
    border-radius: 10px; padding: 1px 7px; line-height: 1.5;
}

/* ---------------- 附件面板 ---------------- */
.att-list { list-style: none; margin: 0 0 6px; padding: 0; }
.att-list li {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 10px; border: 1px solid var(--qms-border);
    border-radius: 8px; background: #fafcff; margin-bottom: 6px; font-size: var(--qms-fs-sm);
}
.att-list li:last-child { margin-bottom: 0; }
.att-ico { font-size: 16px; flex: 0 0 auto; }
.att-name {
    color: var(--qms-navy-light); text-decoration: none;
    flex: 1 1 auto; min-width: 0; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
}
.att-name:hover { text-decoration: underline; }
.att-meta { color: #8a97a6; font-size: var(--qms-fs-xs); flex: 0 0 auto; }
.att-del { flex: 0 0 auto; }

/* ---------------- 我的待办列表（审批 + 整改） ---------------- */
.todo-list { list-style: none; margin: 0; padding: 0; }
.todo-list li {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 9px 12px; border: 1px solid var(--qms-border);
    border-radius: 8px; background: #fff; margin-bottom: 8px; font-size: var(--qms-fs-sm);
}
.todo-list li:last-child { margin-bottom: 0; }
/* 逾期整改：左侧红条 + 浅红底，扫一眼就能挑出来 */
.todo-list li.is-overdue {
    border-color: #f1c2c7; background: #fff7f7;
    box-shadow: inset 3px 0 0 #d9534f;
}
.todo-module {
    flex: 0 0 auto; color: #6b7886; font-size: var(--qms-fs-xs);
    background: #eef2f7; border-radius: 6px; padding: 1px 8px;
}
/* 「整改」标签：与审批待办区分，但同色系不抢注意力 */
.todo-kind {
    flex: 0 0 auto; font-size: var(--qms-fs-xs); color: #8a5a00;
    background: #fff3d9; border: 1px solid #ffe2a8; border-radius: 6px;
    padding: 0 7px;
}
.todo-doc { flex: 0 0 auto; color: var(--qms-navy-light); text-decoration: none; font-weight: 600; }
.todo-doc:hover { text-decoration: underline; }
.todo-title {
    flex: 1 1 220px; min-width: 0; color: #4a5866; font-size: var(--qms-fs-xs);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.todo-actions { display: flex; gap: 6px; margin-left: auto; }
.act-chip {
    font-size: var(--qms-fs-xs); color: #1c4f7c; background: #e7f1fb;
    border: 1px solid #cfe2f4; border-radius: 12px; padding: 1px 10px;
}

/* ---------------- 可折叠面板（如首页审批待办） ---------------- */
.panel-fold > summary.panel-head {
    list-style: none;
    cursor: pointer;
    user-select: none;
}
.panel-fold > summary.panel-head::-webkit-details-marker { display: none; }
.panel-fold > summary.panel-head:hover { background: #fafbfd; }
.panel-fold:not([open]) > summary.panel-head { border-bottom: none; }

.panel-fold .fold-caret {
    font-size: 10px;
    color: #8a97a6;
    transition: transform .15s;
    flex: 0 0 auto;
}
.panel-fold[open] .fold-caret { transform: rotate(90deg); }
.panel-fold .fold-hint { font-size: var(--qms-fs-xs); color: #a3aeba; }

/* ============================================================
   字体尺寸统一化（覆盖 Bootstrap 相对缩放的默认值）
   Bootstrap 大量组件使用 em/rem 相对单位，会在表格等小字号
   容器里继续缩小，造成「同一页面字号不一」。以下统一到
   12 / 13 / 14 / 16 刻度，组件内不再出现 9-12px 混杂的小字。
   ============================================================ */

/* 表格内一切文本（含 .small / <small>）统一 13px，消除同排混排 */
.data-table,
.data-table td,
.data-table .small,
.data-table small { font-size: var(--qms-fs-sm); }

/* 徽标：Bootstrap 默认 .75em 在 13px 表格内仅约 9.75px，统一 12px */
.badge {
    font-size: var(--qms-fs-xs);
    font-weight: 600;
    padding: .3em .62em;
    line-height: 1.45;
}

/* 图表口径标签：说明「这张图统计的是什么」，不是状态徽标，所以不用
   实心 badge 的视觉权重。2026-11-01：原先写成「PQC %」「OQC %」，
   角色缩写与百分号被当成两个并列的短标签，语义也重复（单位已在
   Y 轴标题上）。改为「角色 + 业务口径」的一句灰色小标签。 */
.metric-tag {
    font-size: var(--qms-fs-xs);
    font-weight: 500;
    color: #5B6B7B;
    background: #F2F5F9;
    border: 1px solid #DCE4ED;
    border-radius: 4px;
    padding: .12rem .42rem;
    white-space: nowrap;
}

/* 一格内的多个徽标（如角色列表的「可访问模块」）：必须成组换行。
   窄屏 td 是 flex 容器，散落的徽标会各自成为一个 flex 项排成一横排，
   把整张表格撑出屏幕；用容器包住后可按行折行，长文案也能内部折行。 */
.chip-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .3rem .35rem;
}
.chip-group .badge {
    max-width: 100%;
    white-space: normal;
    text-align: left;
    word-break: break-word;
}

/* 通用小字统一 12px，不再随父级 em 继续缩小 */
small,
.small { font-size: var(--qms-fs-xs); }

/* 表单控件：Bootstrap 默认 1rem=16px，与全站 14px 基准不符 */
.form-control,
.form-select { font-size: var(--qms-fs-base); }
.form-control-sm,
.form-select-sm { font-size: var(--qms-fs-sm); }

/* 按钮：常规 14px，小按钮 13px（表格内一致） */
.btn { font-size: var(--qms-fs-base); }
.btn-sm { font-size: var(--qms-fs-sm); }

/* 下拉菜单与提示条 */
.dropdown-menu,
.dropdown-item,
.dropdown-item-text { font-size: var(--qms-fs-base); }
.alert { font-size: var(--qms-fs-base); }

/* 分页：与页脚说明文字统一 12px */
.pagination .page-link,
.pagination-sm .page-link { font-size: var(--qms-fs-xs); }

/* ============================================================
   角色权限：逐模块 + 逐动作的授权卡片
   ============================================================ */
.perm-card {
    background: #fafbfd;
    border: 1px solid var(--qms-line, #e6eaf0);
    border-radius: 6px;
    padding: .55rem .7rem;
    height: 100%;
}
.perm-switch { accent-color: var(--qms-primary, #1f4e79); }
.perm-summary { font-size: var(--qms-fs-xs); white-space: nowrap; }
.perm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem .65rem;
    padding-top: .45rem;
    border-top: 1px dashed #e6eaf0;
}
.perm-chip {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: var(--qms-fs-xs);
}
.perm-chip .form-check-input { margin: 0; }
.perm-quick { font-size: var(--qms-fs-xs); margin-left: auto; }
.perm-quick .btn-link { font-size: var(--qms-fs-xs); text-decoration: none; }

/* ============================================================
   图表周期选择器（趋势图面板头部）
   把原先写死的「近 12 个月」徽标换成下拉框 + 自定义月数输入框，
   尺寸压到与徽标同一视觉量级，避免撑高面板标题栏。
   ============================================================ */
.period-ctrl {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-left: auto;
}
.period-ctrl .form-select-sm,
.period-ctrl .form-control-sm {
    font-size: var(--qms-fs-xs);
    height: auto;
    width: auto;
    padding: .2rem 1.6rem .2rem .5rem;
}
.period-ctrl .form-select-sm { min-width: 6.5rem; }
.period-ctrl .period-custom {
    width: 4.4rem;
    padding-right: .5rem;
    text-align: center;
}
.period-ctrl .period-unit {
    font-size: var(--qms-fs-xs);
    color: #55657a;
    white-space: nowrap;
}

/* ============================================================
   图表面板内的多维筛选条（质量分析）
   业务维度下拉框横排在图表上方，换行不折断面板布局；
   控件压到与徽标同量级，筛选项多也不至于盖过图表本身。
   ============================================================ */
/* 面板内容区作为容器查询上下文：半宽面板在窄视口下自动收紧筛选控件，
   保证「更多筛选」与重置/导出按钮始终与筛选框同行（见下方 @container） */
.panel-body { container-type: inline-size; }

.chart-filters {
    display: flex;
    flex-wrap: wrap;
    /* 控件上方带标签后整体变高，底对齐让按钮与下拉框底边平齐 */
    align-items: flex-end;
    gap: .35rem;
    margin-bottom: .5rem;
}
/* 筛选控件 = 小标签 + 控件：标签竖排在控件上方，不额外占用横向空间，
   否则半宽面板一行放不下两个筛选 + 按钮组。 */
.cf-item { display: flex; flex-direction: column; gap: 2px; }.cf-label {
    font-size: 11px;
    line-height: 1.2;
    color: #7B8794;
    padding-left: 2px;
    white-space: nowrap;
}
/* 组织关系视图：用 --depth 控制左缩进，层级一眼可见，不必嵌套表格 */
.org-indent { display: inline-block; width: calc(var(--depth, 0) * 18px); }
.org-branch { color: #B6C2CE; margin-right: 2px; }
.chart-filters .form-select-sm,
.chart-filters .form-control-sm {
    font-size: var(--qms-fs-xs);
    width: auto;
    max-width: 8.5rem;
    padding: .2rem 1.6rem .2rem .5rem;
}
.chart-filters .form-control-sm {
    padding-right: .5rem;
}
.chart-filters .form-select-sm { min-width: 5.5rem; }

/* ============================================================
   报表中心筛选行（弹性横排）
   ------------------------------------------------------------
   预览页筛选条件较多时，默认只展示前几个常用项，其余收进
   <details class="filter-more">；summary 做成虚线下划线胶囊样式，
   展开/收起用 ::after 箭头示意，折叠项带值时由后端加 open 属性。

   布局要点（2026-10-21 用户反馈「更多筛选条件」单独换行难看）：
   整行用 flex 横排，收起时「更多筛选条件」与查询按钮同行；
   展开时折叠体 flex-basis:100% 独占一行，隐藏条件在行内弹性排列，
   查询按钮仍停留在第一行，不会被挤下去。
   ============================================================ */
.report-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: .5rem .75rem;
}
.report-filter-item { flex: 0 0 auto; }
.report-filter-item .form-label { margin-bottom: .15rem; }
.report-filters .form-select-sm,
.report-filters .form-control-sm,
.filter-more-body .form-select-sm,
.filter-more-body .form-control-sm {
    width: auto;
    min-width: 7.5rem;
    max-width: 13rem;
}
.report-filter-actions {
    display: flex;
    align-items: center;
    gap: .35rem;
    padding-bottom: .1rem;
}
/* 折叠体做成浮层：展开时 <details> 不占整行、不参与换行计算，
   summary 与查询/重置按钮的位置完全不变（2026-11-01 用户反馈
   「点击后位置应当保持不变」）。旧写法 flex-basis:100% 会把整行
   撑开，把按钮挤到第二行。 */
.filter-more { position: relative; flex: 0 0 auto; margin-top: 0; }
.filter-more[open] { flex-basis: auto; }
.filter-more > summary {
    cursor: pointer;
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: var(--qms-fs-sm);
    color: #6c757d;
    padding: .25rem .6rem;
    border: 1px dashed #ced4da;
    border-radius: .25rem;
    user-select: none;
}
.filter-more > summary::-webkit-details-marker { display: none; }
.filter-more > summary::after { content: '▾'; }
.filter-more[open] > summary::after { content: '▴'; }
.filter-more > summary .badge { font-size: var(--qms-fs-xs); }
.filter-more-body {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: .5rem .75rem;
    /* 浮在筛选行下方，不占据文档流 → 按钮位置零位移 */
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 40;
    /* max-content：条件少时自动收窄，不撑满一整条；超过上限再换行 */
    width: max-content;
    max-width: min(46rem, calc(100vw - 3rem));
    margin-top: 0;
    padding: .7rem .8rem;
    background: #fff;
    border: 1px solid var(--qms-border);
    border-radius: 6px;
    box-shadow: 0 10px 26px rgba(27, 43, 61, .16);
}
/* 面板默认 overflow:hidden 会把浮层裁掉（与下拉菜单同一坑），
   展开期间临时放开；关闭后自动恢复，不必 JS 加解类。 */
.panel:has(.filter-more[open]),
.panel:has(.chart-filters-more[open]) { overflow: visible; }

/* 停靠方向由 filter-more.js 实测后加类：按钮靠右时右对齐，
   靠近页面底部时向上翻，避免浮层顶出视口。 */
.filter-more.flip-right > .filter-more-body,
.chart-filters-more.flip-right > .chart-filters-more-body { left: auto; right: 0; }
.filter-more.flip-up > .filter-more-body,
.chart-filters-more.flip-up > .chart-filters-more-body {
    top: auto;
    bottom: calc(100% + 4px);
}

/* 手机端改为底部抽屉：390px 宽度下任何左右对齐都会溢出，
   与其逐个场景补丁，不如直接不参与水平定位。 */
@media (max-width: 767.98px) {
    .filter-more > .filter-more-body,
    .chart-filters-more > .chart-filters-more-body {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 12px;
        top: auto;
        width: auto;
        max-width: none;
        max-height: 60vh;
        overflow-y: auto;
        z-index: 1055;
    }
    .filter-more.flip-up > .filter-more-body,
    .chart-filters-more.flip-up > .chart-filters-more-body {
        top: auto;
        bottom: 12px;
    }
}

/* ============================================================
   质量分析「更多筛选」折叠区（原生 <details>，无 JS）
   ------------------------------------------------------------
   每张图默认只展示前 2 个常用筛选，其余收进 <details>；
   展开体复用 .chart-filters 的横排弹性布局。所有筛选控件
   即使处于折叠区也始终存在于 DOM，change 事件绑定不受影响。

   布局要点（2026-10-21 用户反馈「更多筛选」单独换行难看）：
   <details> 作为 .chart-filters 的弹性子项，收起时与常用筛选、
   重置/导出按钮同行；展开时 flex-basis:100% 独占一行，隐藏条件
   在整行内排列，第一行的按钮不会被挤下去。
   ============================================================ */
.chart-filters-more { position: relative; flex: 0 0 auto; }
/* 与报表页同款：展开不占整行，重置/导出按钮位置不变 */
.chart-filters-more[open] { flex-basis: auto; }
.chart-filters-more > summary {
    cursor: pointer;
    list-style: none;
    display: inline-flex;
    align-items: center;
    font-size: var(--qms-fs-xs);
    color: #6c757d;
    padding: .15rem .5rem;
    border: 1px dashed #ced4da;
    border-radius: .25rem;
    user-select: none;
}
.chart-filters-more > summary::-webkit-details-marker { display: none; }
.chart-filters-more > summary::after { content: ' ▾'; }
.chart-filters-more[open] > summary::after { content: ' ▴'; }
.chart-filters-more-body {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: .35rem;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 40;
    width: max-content;
    max-width: min(34rem, calc(100vw - 3rem));
    margin-top: 0;
    padding: .5rem .6rem;
    background: #fff;
    border: 1px solid var(--qms-border);
    border-radius: 6px;
    box-shadow: 0 10px 26px rgba(27, 43, 61, .16);
}
.chart-filters-more-body .form-select-sm,
.chart-filters-more-body .form-control-sm {
    font-size: var(--qms-fs-xs);
    width: auto;
    max-width: 11rem;
    padding: .2rem 1.6rem .2rem .5rem;
}
.chart-filters-more-body .form-control-sm { padding-right: .5rem; }
.chart-filters-more-body .form-select-sm { min-width: 5.5rem; }
/* 每张图的重置 / 导出按钮：跟在筛选控件之后，靠右排列。
   flex:0 0 auto 锁定按钮组宽度不被压缩——面板半宽（1440 视口下约
   539px）内要容纳「两个常用筛选 + 更多筛选 + 按钮组」，任一项超宽
   都会把按钮挤到第二行（2026-10-21 用户反馈「导出和重置按钮错行」）。 */
.chart-filter-actions {
    display: flex;
    align-items: center;
    gap: .3rem;
    flex: 0 0 auto;
}

/* ============================================================
   窄面板自适应（容器查询，挂在 .panel-body 上）
   ------------------------------------------------------------
   半宽面板内容宽 ≤30rem（约 1280 视口）：筛选控件收紧到 7rem，
   保证「更多筛选 + 重置/导出」与筛选框同行，不换行。
   内容宽 ≤26rem（约 1124 视口）：再收紧一档，并压缩
   「更多筛选」与按钮内距，给 1024 小窗也留出同行空间。
   更窄的窗口接受换行降级（两行仍完整可用）。
   ============================================================ */
@container (max-width: 30rem) {
    .chart-filters .form-select-sm,
    .chart-filters .form-control-sm { max-width: 7rem; }
}
@container (max-width: 26rem) {
    .chart-filters .form-select-sm,
    .chart-filters .form-control-sm { max-width: 5.5rem; min-width: 5rem; }
    .chart-filters-more > summary { padding: .1rem .3rem; }
    .chart-filter-actions .btn { padding-left: .35rem; padding-right: .35rem; }
}

/* ============================================================
   flash 提示条关闭按钮「×」垂直居中
   ------------------------------------------------------------
   成因：Bootstrap 5.3 的 .alert-dismissible .btn-close 是
        position:absolute; top:0; padding:1.25rem 1rem;
   而全站提示条用 py-2 压缩了高度（约 39px），按钮盒却高达
   约 56px 且顶部对齐，于是「×」被压到偏下、不在中线上。
   处理：改为相对提示条 50% 定位 + translateY(-50%)，多行提示
   增高时同样居中；横向内边距收回，右边缘仍距边 1rem，
   与原视觉效果一致。
   ============================================================ */
.alert-dismissible { position: relative; }
.alert-dismissible .btn-close {
    top: 50%;
    right: .75rem;
    transform: translateY(-50%);
    padding: .25rem;
    margin: 0;
    line-height: 1;
    font-size: var(--qms-fs-base);
}

/* ============================================================
   评分规则页：门槛输入框 + 结果预览 单行排布
   ------------------------------------------------------------
   成因：原先用 Bootstrap .col-md-3 × 4 四等分，三个数字框每个
   约占 250px（内容只有两三位数，大量留白），而「结果预览」同样
   只有约 220px，装不下「A≥90 B≥80 C≥70 D 其余」，被挤成两行。
   处理：输入框固定 178px 只占够用的宽度，预览列吃掉剩余空间
   并禁止内部换行，空间按内容需要分配。
   ============================================================ */
.grading-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem;
}
.grading-field {
    flex: 1 1 178px;
    min-width: 150px;
}
.grading-preview {
    flex: 0 0 auto;                 /* 预览框按内容宽度收紧，右侧不留大片空白 */
}
.grading-preview-box {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .25rem 1rem;
    min-height: 35px;               /* 与 .form-control 输入框等高 */
    padding: .25rem .75rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: .375rem;
    color: #55657a;
    font-size: var(--qms-fs-base);
    white-space: nowrap;
    cursor: not-allowed;
}
.grading-preview-item {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
}
.grading-preview-item .badge {
    font-size: var(--qms-fs-xs);
    font-weight: 600;
}

/* ---------------- 自定义字段管理页 ---------------- */
/* 模块名（一级）：整条色带 + 左侧粗蓝标 + 吸顶，与下面的功能菜单形成明显层级 */
.cf-group-title {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: .55rem .875rem .5rem;
    background: linear-gradient(180deg, #edf4fc 0%, #e2ecf7 100%);
    border-top: 1px solid #d5e3f1;
    border-bottom: 1px solid #cfe0ef;
    border-left: 4px solid var(--qms-bar);
    font-size: var(--qms-fs-base);
    font-weight: 700;
    color: #0f4c75;
    letter-spacing: .4px;
    line-height: 1.3;
}

.cf-group-title::before {
    content: '';
    flex: 0 0 auto;
    width: 6px;
    height: 6px;
    border-radius: 2px;
    background: var(--qms-bar);
}

.cf-group-title:first-child { border-top: none; }

/* 功能菜单项（二级）：缩进 + 圆点，字号/字重/颜色均弱于模块名 */
.cf-res-item {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    padding: .45rem .875rem .45rem 1.9rem;
    border-left: 3px solid transparent;
    color: #4a5b70;
    text-decoration: none;
    font-size: var(--qms-fs-sm);
}

.cf-res-item::before {
    content: '';
    position: absolute;
    left: 1.15rem;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #c2d2e3;
    transition: background .15s;
}

.cf-res-item:hover { background: #f5f7fa; color: #1b2b3d; }
.cf-res-item:hover::before { background: #8fb2d1; }

.cf-res-item.active {
    background: #eef3fb;
    border-left-color: var(--qms-accent);
    color: #12496f;
    font-weight: 600;
}

.cf-res-item.active::before { background: var(--qms-accent); }

.cf-form-title {
    font-size: var(--qms-fs-base);
    font-weight: 600;
    color: #1b2b3d;
    margin-bottom: .75rem;
}

.cf-form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem;
}

.cf-form-field { flex: 1 1 170px; min-width: 150px; }

.cf-form-field.wide { flex: 1 1 100%; }

.cf-form-checks {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding-bottom: .375rem;
}



/* ============================================================
   首页 KPI 仪表盘（2026-10-24）
   状态色：ok 绿 / warn 橙 / bad 红 / nodata 灰
   注意：与股票"红涨绿跌"相反，这里「红 = 风险」
   ============================================================ */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: 12px;
}

.kpi-card {
    display: block;
    padding: 12px 14px 10px;
    border: 1px solid #e3e9ef;
    border-left: 3px solid #cfd8dc;
    border-radius: 8px;
    background: #fff;
    text-decoration: none;
    transition: border-color .15s, transform .15s, box-shadow .15s;
}
.kpi-card:hover {
    border-color: var(--qms-accent);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(18, 57, 95, .08);
}
.kpi-card.status-ok     { border-left-color: #2E7D32; }
.kpi-card.status-warn   { border-left-color: #F57C00; }
.kpi-card.status-bad    { border-left-color: #C62828; }
.kpi-card.status-nodata { border-left-color: #cfd8dc; }

.kpi-head { display: flex; align-items: center; gap: 8px; }
.kpi-name { font-size: var(--qms-fs-sm); color: #55657a; }
.kpi-status {
    margin-left: auto;
    font-size: var(--qms-fs-xs);
    padding: 1px 7px;
    border-radius: 999px;
    background: #eef2f6;
    color: #7b8794;
}
.status-ok     .kpi-status { background: #e8f5e9; color: #2E7D32; }
.status-warn   .kpi-status { background: #fff3e0; color: #F57C00; }
.status-bad    .kpi-status { background: #ffebee; color: #C62828; }
.status-nodata .kpi-status { background: #eef2f6; color: #93a1b0; }

.kpi-value {
    font-size: 27px;
    font-weight: 600;
    line-height: 1.15;
    margin: 6px 0 2px;
    color: #12395f;
}
.kpi-card.status-bad  .kpi-value { color: #C62828; }
.kpi-card.status-warn .kpi-value { color: #F57C00; }
.kpi-card.status-ok   .kpi-value { color: #12395f; }
.kpi-card.status-nodata .kpi-value { color: #93a1b0; }
.kpi-unit { font-size: var(--qms-fs-xs); font-weight: 400; color: #7b8794; margin-left: 3px; }

.kpi-target { font-size: var(--qms-fs-xs); color: #93a1b0; }
.kpi-foot { margin-top: 6px; }
.kpi-delta { font-size: var(--qms-fs-xs); }
.kpi-delta.up   { color: #2E7D32; }   /* 朝好的方向变化 */
.kpi-delta.down { color: #C62828; }   /* 朝坏的方向变化 */
.kpi-delta.flat { color: #93a1b0; }
.kpi-spark { height: 42px; margin-top: 4px; }

/* ---- A 区环形达成率 ---- */
.donut-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 24px;
    padding-top: 6px;
}
.donut-item { flex: 0 0 150px; text-align: center; }
.donut-caption { margin-top: -6px; }
.donut-name { font-size: var(--qms-fs-xs); color: #55657a; }
.donut-value { font-size: var(--qms-fs-base); font-weight: 600; color: #12395f; }
.donut-target { font-size: var(--qms-fs-xs); color: #93a1b0; }

/* ---- KPI 设置页分组标题 ---- */
.kpi-settings-group {
    font-size: var(--qms-fs-base);
    font-weight: 600;
    color: #1b2b3d;
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #eef2f6;
}

/* 打印：首页仪表盘按纸质材料排版（隐藏导航/按钮，卡片避免跨页断裂） */
@media print {
    .app-sidebar, .app-topbar .page-actions, .kpi-foot .btn,
    .risk-link, .panel-fold .fold-hint { display: none !important; }
    .kpi-card, .risk-list li, .donut-item { break-inside: avoid; }
    .panel { box-shadow: none; border-color: #ccc; }
    .kpi-card { border: 1px solid #999; }
}

/* ---- D 区风险清单 ---- */
.risk-list { list-style: none; margin: 0; padding: 0; }
.risk-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    background: #fafcff;
    margin-bottom: 6px;
    font-size: var(--qms-fs-sm);
}
.risk-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.risk-bad  .risk-dot { background: #C62828; }
.risk-warn .risk-dot { background: #F57C00; }
.risk-ok   .risk-dot { background: #2E7D32; }
.risk-name { font-weight: 500; color: #1b2b3d; }
.risk-count { color: #55657a; }
.risk-sample {
    margin-left: auto;
    font-size: var(--qms-fs-xs);
    color: #7b8794;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 46%;
}
.risk-link { font-size: var(--qms-fs-xs); color: #1c4f7c; text-decoration: none; }
.risk-link:hover { text-decoration: underline; }

@media (max-width: 860px) {
    .kpi-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .risk-sample { display: none; }
}

/* ============================================================
   表格列拖拽排序 / 列显隐
   列顺序与显隐由服务端按个人偏好渲染，这里只提供交互反馈：
   可拖列的手型光标、拖拽半透明、落点指示线、列设置浮层、保存提示。
   ============================================================ */
.data-table th.col-draggable { cursor: grab; }
.data-table th.col-draggable:active { cursor: grabbing; }
.data-table th.is-dragging { opacity: .45; }
.data-table th.drop-before { box-shadow: inset 3px 0 0 var(--qms-accent); }
.data-table th.drop-after  { box-shadow: inset -3px 0 0 var(--qms-accent); }

.col-bar { position: relative; padding: 8px 16px; border-bottom: 1px solid var(--qms-border); }
.col-panel {
    position: absolute;
    z-index: 30;
    top: 100%;
    left: 16px;
    width: 268px;
    max-height: 380px;
    overflow: auto;
    background: #fff;
    border: 1px solid var(--qms-border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(18, 57, 95, .14);
    padding: 10px 12px;
}
.col-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--qms-fs-xs);
    color: #6b7a90;
    margin-bottom: 6px;
}
.col-panel-head .btn { padding: 0; }
.col-panel-list { list-style: none; margin: 0; padding: 0; }
.col-panel-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 4px;
    border-radius: 6px;
    font-size: var(--qms-fs-sm);
    cursor: grab;
}
.col-panel-item:hover { background: #f4f6f9; }
.col-panel-item.is-dragging { opacity: .45; }
.col-panel-item.drop-before { box-shadow: inset 0 2px 0 0 var(--qms-accent); }
.col-panel-item.drop-after  { box-shadow: inset 0 -2px 0 0 var(--qms-accent); }
.col-panel-grip { color: #a9b4c4; font-size: var(--qms-fs-xs); letter-spacing: -2px; }
.col-panel-label { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 列设置按钮内联进标题行（2026-10-27）：不再独占一行，
   挂在「共 N 条」标签之后；浮层相对按钮定位，左对齐弹出。 */
.col-set-wrap { position: relative; display: inline-flex; align-items: center; margin-left: 4px; }
.col-set-wrap .col-panel { left: 0; top: calc(100% + 6px); }

.col-toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 2000;
    padding: 8px 14px;
    border-radius: 8px;
    background: #12395f;
    color: #fff;
    font-size: var(--qms-fs-sm);
    box-shadow: 0 8px 24px rgba(18, 57, 95, .22);
}
.col-toast.is-bad { background: #c0392b; }

/* ============================================================
   首页看板：卡片栅格 + 单卡关闭 / 恢复（2026-10-27）
   卡片宽度写在 --span 上，JS 在"同排只剩一张"时把它改成 12，
   实现关掉一张后其余卡片自动补位，不留半边空白。
   ============================================================ */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}
.dash-grid[hidden] { display: none; }
.dash-cell { grid-column: span var(--span, 12); min-width: 0; }
/* 同排只剩一张时由 JS 把 --span 改成 12（行内样式优先，这里只留个标记） */
.dash-cell.is-only { --span: 12; }
.dash-cell[hidden], .kpi-card[hidden] { display: none; }
.dash-cell > .panel { height: 100%; }
@media (max-width: 991.98px) {
    .dash-cell { grid-column: span 12; }
}

.card-close {
    margin-left: auto;
    flex: 0 0 auto;
    border: none;
    background: transparent;
    color: #a3aeba;
    font-size: var(--qms-fs-base);
    line-height: 1;
    padding: 2px 6px;
    border-radius: 6px;
    cursor: pointer;
}
.card-close:hover { color: #c62828; background: #ffebee; }
.kpi-card .card-close {
    margin-left: 4px;
    font-size: var(--qms-fs-xs);
    padding: 0 3px;
}

.dash-restore {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px 14px;
    margin-bottom: 1rem;
    background: #f6f8fb;
    border: 1px dashed var(--qms-border);
    border-radius: 8px;
    font-size: var(--qms-fs-sm);
    color: #55657a;
}
.dash-restore b { color: #12395f; }
.dash-restore-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dash-chip {
    border: 1px solid var(--qms-border);
    background: #fff;
    color: #456;
    border-radius: 999px;
    padding: 1px 10px;
    font-size: var(--qms-fs-xs);
    cursor: pointer;
}
.dash-chip:hover { border-color: var(--qms-accent); color: var(--qms-accent); }

/* 待办置顶后展开是整行宽，清单截断时给一句说明 */
.todo-more {
    font-size: var(--qms-fs-xs);
    color: #93a1b0;
    padding: 4px 10px;
}
.todo-more a { color: #1c4f7c; text-decoration: none; }
.todo-more a:hover { text-decoration: underline; }

@media print {
    .col-bar, .col-set-wrap, .col-toast { display: none !important; }
    .card-close, .dash-restore { display: none !important; }
}

/* ============================================================
   移动端适配（2026-10-28）
   ------------------------------------------------------------
   ① 侧栏抽屉：桌面仍是原来的 sticky 固定侧栏，仅 <992px 变为可滑出抽屉
      （原来是 ≤860px 直接 display:none，手机上没有导航入口）
   ② 表格窄屏卡片化：thead 隐藏、每行一张卡、td 用 data-label 显示字段名
   ③ 触摸目标放大，避免手机点不准；列设置浮层改为贴边弹出
   ============================================================ */
@media (max-width: 991.98px) {
    .app-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 1045;
        width: min(82vw, 300px);
        flex: 0 0 auto;
        transform: translateX(-100%);
        transition: transform .25s ease;
    }
    .app-shell.side-open .app-sidebar {
        transform: translateX(0);
        box-shadow: 0 0 28px rgba(10, 24, 40, .38);
    }
    .side-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1040;
        background: rgba(11, 24, 40, .45);
    }
    .side-backdrop[hidden] { display: none; }
}
@media (min-width: 992px) {
    .side-backdrop { display: none !important; }
}

/* ---- ② 表格窄屏卡片化（≤860px）---- */
@media (max-width: 860px) {
    .table-wrap { overflow-x: auto; }
    .data-table thead { display: none; }
    .data-table, .data-table tbody, .data-table tr, .data-table td {
        display: block;
        width: 100%;
    }
    .data-table tr {
        margin: 0 0 .75rem;
        padding: .5rem .7rem;
        border: 1px solid #e3e9ef;
        border-radius: 10px;
        background: #fff;
    }
    .data-table tbody tr:nth-child(even) { background: #fff; }
    .data-table td {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: 1rem;
        padding: .4rem 0;
        border: 0;
        text-align: right;
        word-break: break-all;
    }
    .data-table td::before {
        content: attr(data-label);
        flex: 0 0 auto;
        color: #7b8794;
        font-size: var(--qms-fs-xs);
        text-align: left;
    }
    /* 标签列占用左侧定宽，徽标组吃满剩余宽度并靠右；min-width:0 是关键，
       否则 flex 项的 min-content 会顶开卡片（权限清单曾因此溢出屏幕） */
    .data-table td .chip-group {
        flex: 1 1 0;
        min-width: 0;
        justify-content: flex-end;
    }
    .data-table td .chip-group .badge { text-align: left; }
    /* 「可访问模块」这类标签组格：整行铺开，字段名一行、徽标另起一行左对齐。
       若沿用右侧窄列，一条「研发设计质量 · 查看、新建/编辑、导出、审批流转」
       会被挤成三四行竖块，难以阅读。 */
    .data-table td.col-badges {
        display: block;
        text-align: left;
    }
    .data-table td.col-badges::before {
        display: block;
        margin-bottom: .3rem;
    }
    .data-table td.col-badges .chip-group { justify-content: flex-start; }
    /* 列设置里勾掉的隐藏列：display:block 会盖掉 [hidden]，必须显式藏住 */
    .data-table td[hidden] { display: none !important; }
    .data-table td.col-idx { color: #93a1b0; font-size: var(--qms-fs-xs); }
    .data-table td.col-idx::before { content: '#'; }
    .data-table td.col-actions {
        justify-content: flex-end;
        gap: .4rem;
        padding-top: .55rem;
        margin-top: .35rem;
        border-top: 1px dashed #eef2f6;
        text-align: right;
        /* 注意：td 默认是 align-items: baseline，而「删除」外面套了一层 form，
           两者基线不同 → 删除按钮会比详情/编辑高一截，这里改居中对齐 */
        align-items: center;
    }
    .data-table td.col-actions::before { content: none; }
    .data-table td.col-actions .btn { min-height: 34px; }
    .data-table td.col-actions form { display: inline-flex; }
}

/* ---- ③ 触摸友好：点击区放大、顶栏换行、列设置浮层贴边 ---- */
@media (max-width: 991.98px) {
    /* 标题下方的模块说明文字在手机上会占掉 36px 并把按钮挤到下一行，隐藏 */
    .app-topbar .page-desc { display: none; }

    .btn { min-height: 40px; }
    .btn-sm { min-height: 34px; }
    /* min-height 撑高后，文字默认停在上边缘（多余空间落在底部）→
       统一改成内联弹性盒并把内容居中，按钮文字才是真的上下居中 */
    .btn, .page-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .form-control, .form-select { min-height: 40px; }
    .page-link { min-height: 40px; }

    .side-link, .side-group > summary { min-height: 44px; }
    .pagination { flex-wrap: wrap; }
    .app-topbar { flex-wrap: wrap; gap: .5rem; }
    .app-topbar .me-auto { flex: 1 1 auto; min-width: 0; }
    /* 注意选择器：必须写成 .col-set-wrap .col-panel（特异性 0,2,0）才能盖住
       前面同名的 top: calc(100% + 6px)；只写 .col-panel(0,1,0) 会被它压过，
       于是 fixed 下 100% = 视口高，浮层被顶到屏幕外（表现为点了没反应）。 */
    .col-set-wrap .col-panel,
    .col-bar .col-panel,
    .col-panel {
        position: fixed;
        left: 0;
        right: 0;
        top: auto;
        bottom: 0;                      /* 关键：不写 bottom 会被排到视口外 */
        width: auto;
        max-height: 62vh;
        overflow-y: auto;
        z-index: 1050;                  /* 高于侧栏抽屉(1045) */
        border-radius: 12px 12px 0 0;
        border-bottom: 0;
        padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
        box-shadow: 0 -8px 28px rgba(18, 57, 95, .2);
        animation: colSheetIn .18s ease-out;
    }
    @keyframes colSheetIn {
        from { transform: translateY(12px); opacity: .4; }
        to   { transform: translateY(0);    opacity: 1; }
    }
    /* 底部 sheet 遮罩（用 :not([hidden]) 抬特异性，压过文件末尾的全局 display:none） */
    .col-sheet-mask:not([hidden]) {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1049;
        background: rgba(11, 24, 40, .38);
    }
    .col-sheet-mask[hidden] { display: none; }
}

/* 列设置底部 sheet 的遮罩：桌面端用不到（浮层是贴按钮的小面板），必须默认不显示；
   只在 ≤992px 的底部 sheet 模式下由媒体查询启用。 */
.col-sheet-mask { display: none; }

/* 触屏下的列排序按钮（HTML5 拖放在触屏不可用，改用 ↑ / ↓） */
.col-panel-tools { display: inline-flex; gap: 2px; margin-left: auto; }
.col-move-btn {
    padding: 0 .4rem;
    min-height: 26px;
    line-height: 1.15;
    font-size: var(--qms-fs-xs);
}

/* ---- 扫码页（/m/scan）---- */
.scan-view {
    position: relative;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    background: #0d1520;
    border-radius: 12px;
    overflow: hidden;
}
.scan-view video { width: 100%; display: block; }
.scan-frame {
    position: absolute;
    left: 12%;
    right: 12%;
    top: 22%;
    bottom: 22%;
    border: 2px solid rgba(255, 255, 255, .85);
    border-radius: 10px;
    box-shadow: 0 0 0 9999px rgba(6, 14, 24, .35);
}
.scan-line {
    position: absolute;
    left: 14%;
    right: 14%;
    height: 2px;
    background: var(--qms-accent);
    animation: scanSweep 1.8s ease-in-out infinite;
}
@keyframes scanSweep {
    0%, 100% { top: 24%; }
    50%      { top: 76%; }
}
.scan-tip { text-align: center; color: #7b8794; font-size: var(--qms-fs-sm); }
.scan-result-list { list-style: none; margin: 0; padding: 0; }
.scan-result-list li {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .6rem;
    border: 1px solid #e3e9ef;
    border-radius: 8px;
    margin-bottom: .4rem;
    font-size: var(--qms-fs-sm);
    word-break: break-all;
}
.scan-result-list .code { flex: 1 1 auto; }

/* 窄屏下固定宽度的搜索框/下拉会撑破面板，改为占满可用宽度 */
@media (max-width: 991.98px) {
    .panel-head input[type="search"],
    .panel-head .form-control,
    .panel-head .form-select {
        width: 100% !important;
        max-width: none !important;
    }
    .panel-head form { flex-wrap: wrap; }
    .panel-head form.ms-auto { width: 100%; }
    .panel-head .btn-sm { padding-left: .35rem; padding-right: .35rem; }

    /* ---- 列表页工具栏重排（统一作用域：只作用于带 .panel-head-list 的面板头）----
       目标：窄屏下工具栏只占 3 行 —— ① 标题+共N条+列设置+⋯ ② 搜索框（占满）
             ③ 搜索 / 导出 / 导入 / 新建。
       做法：让搜索表单 display:contents（表单盒子消失，成员直接参与面板头排布），
             再用 order 调整顺序 —— 不这么做的话 form 会占满整行把「搜索」孤立成一行，
             导出/导入/新建又被挤到下一行（原先总共要 4 行）。
       display:contents 只去掉盒子，不影响表单提交与隐藏字段；
       .d-flex 带 !important，这里只能同样祭出 !important。
       其他页面若想复用这套重排，给自己的 .panel-head 加上 panel-head-list 类即可。 */
    .panel-head-list { gap: 6px; }
    .panel-head-list > form.ms-auto { display: contents !important; }
    .panel-head-list > .dropdown { order: 1; }                                  /* ⋯ 提到标题行 */
    .panel-head-list > form.ms-auto > input[type="search"] { order: 2; }        /* 搜索框独占一行 */
    .panel-head-list > .btn,
    .panel-head-list > form.ms-auto > .btn { order: 3; }                        /* 其余按钮跟在搜索后同排 */
}

/* ============================================================
   新建/编辑表单：顶部常驻操作栏 + 字段分块折叠
   ============================================================ */

/* 顶部常驻操作栏：置于 panel 之外，避免被 panel 的 overflow:hidden 破坏 sticky；
   top:56px 紧贴 .app-topbar（height 56, sticky top:0），滚动时始终可见 */
.form-actions {
    position: sticky;
    top: 56px;
    z-index: 15;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid var(--qms-border);
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}
.form-actions .btn { min-height: 34px; }
/* 表单标题居中：标题与编码徽标在 panel-head 内水平居中 */
.form-head { justify-content: center; text-align: center; }
.form-head h2 { margin: 0 auto; }

/* 表单整体：白底"单据"外观 —— 不画外围边框，只靠单元格自身的网格线成形 */
.form-sheet {
    border: none;
    border-radius: 0;
    background: #fff;
    margin-bottom: 14px;
}
.form-sheet > .form-head {
    background: #f7f9fc;
    border-bottom: 1px solid var(--qms-border);
    padding: 12px 16px;
}

/* 分区：左侧小蓝标签（只占标题宽度、不铺满整行，对齐参考截图）+ 下方字段区；
   分区之间用与外框同色的蓝线分隔；原生 <details> 实现点击折叠/展开 */
.form-section { border-top: 1px solid var(--qms-bar, #1E7BBB); }
.form-section:first-of-type { border-top: none; }
.form-section-bar {
    display: flex;
    align-items: center;
    background: transparent;
    padding: 6px 0 4px;
    cursor: pointer;
    user-select: none;
    list-style: none;
}
/* 去掉 <summary> 的默认三角标记（Chrome / 标准两套都清掉），只留自定义 ▶ */
.form-section-bar::-webkit-details-marker { display: none; }
.form-section-bar::marker { content: ''; }
.bar-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 100%;
    background: var(--qms-bar, #1E7BBB);
    color: #fff;
    font-weight: 600;
    font-size: var(--qms-fs-sm);
    padding: 4px 16px 4px 11px;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(20, 60, 100, .18);
    transition: filter .12s;
}
.form-section-bar:hover .bar-tab { filter: brightness(1.08); }
.bar-tab .bar-arrow {
    font-size: 10px;
    opacity: .9;
    transform: rotate(0deg);            /* 收起：▶ 朝右 */
    transition: transform .15s;
}
.form-section[open] > .form-section-bar .bar-arrow { transform: rotate(90deg); }  /* 展开：朝下 */
.form-section-title { font-weight: 600; }
.form-section-body { padding: 4px 0 8px; }

/* 字段区 = 真正的表格网格：单元格零间距、共用边框（对齐 Word 表格观感）
   —— 响应式每行 2/3/4 对（视觉 4/6/8 列），宽字段整行合并。
   表格不画外框（由 .form-sheet 的外框兜底），只画单元格之间的内部线 */
.form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    /* 底色用值单元格色：行末未占满的空位视作"合并空单元格"，不留白色缺角 */
    background: var(--qms-cell-value, #FCF6E0);
    /* 上/左/右三条边由网格容器补齐，单元格只画下边与右边，
       这样每个格子都是封闭的，又不会出现 2px 双线 */
    border-top: 1px solid var(--qms-grid-line, #9CC2E0);
    border-left: 1px solid var(--qms-grid-line, #9CC2E0);
    border-right: 1px solid var(--qms-grid-line, #9CC2E0);
}
@media (min-width: 768px)  { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1500px) { .form-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.form-grid > .f-wide { grid-column: 1 / -1; }
.form-grid > .fcol {
    min-width: 0;                                   /* 防止长内容把栅格撑破 */
    display: flex;                                  /* 让 .frow 填满整格高度 */
    border-bottom: 1px solid var(--qms-grid-line, #9CC2E0);
}
.form-grid > .fcol > .frow { flex: 1 1 auto; }
.form-grid > .fcol.f-wide { border-right: none; }
/* 只在「非最后一列」画右侧竖线，避免与外框叠成 2px */
@media (min-width: 768px) {
    .form-grid > .fcol:not(.f-wide) { border-right: 1px solid var(--qms-grid-line, #9CC2E0); }
    .form-grid > .fcol:not(.f-wide):nth-child(2n) { border-right: none; }
}
@media (min-width: 1200px) {
    .form-grid > .fcol:not(.f-wide):nth-child(2n) { border-right: 1px solid var(--qms-grid-line, #9CC2E0); }
    .form-grid > .fcol:not(.f-wide):nth-child(3n) { border-right: none; }
}
@media (min-width: 1500px) {
    .form-grid > .fcol:not(.f-wide):nth-child(3n) { border-right: 1px solid var(--qms-grid-line, #9CC2E0); }
    .form-grid > .fcol:not(.f-wide):nth-child(4n) { border-right: none; }
}

/* 单元格：标签（浅蓝）+ 值（米黄），两块紧贴，共享中间那条竖线 */
.frow {
    display: flex;
    align-items: stretch;
    gap: 0;
    min-height: 32px;
}
.frow-label {
    flex: 0 0 7.4em;                    /* 收紧标签占宽，给控件留更多空间 */
    display: flex;
    align-items: center;
    justify-content: flex-end;
    background: var(--qms-cell-label, #D9E7F5);
    border-right: 1px solid var(--qms-grid-line, #9CC2E0);
    padding: 4px 8px;
    text-align: right;
    font-size: var(--qms-fs-sm);
    font-weight: 500;
    color: #27435a;
    line-height: 1.3;
}
.frow-ctrl {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--qms-cell-value, #FCF6E0);
}
/* 控件"融进"单元格：去掉圆角、外边框与阴影，让整个格子看起来就是表格的一格 */
.frow-ctrl .form-control,
.frow-ctrl .form-select {
    width: 100%;
    border: none;
    border-radius: 0;
    background-color: transparent;
    box-shadow: none;
    padding: 6px 8px;
    font-size: var(--qms-fs-sm);
}
.frow-ctrl .form-control:focus,
.frow-ctrl .form-select:focus {
    background-color: #fff;
    box-shadow: inset 0 0 0 1.5px #4f97d4;
}
/* 只读 / 计算 / 状态单元格：更灰的米黄，一眼看出不可编辑 */
.frow-ctrl .form-control.bg-light,
.frow-ctrl .form-control.bg-light:focus {
    background-color: #EFE8D2 !important;
    color: #55606b;
    box-shadow: none;
}
.frow-ctrl .form-hint {
    padding: 0 8px 4px;
    margin: 0;
    font-size: var(--qms-fs-xs);
    line-height: 1.3;
}
/* 多行文本：格子跟着长高 */
.frow-ctrl textarea.form-control { resize: vertical; }
/* 必填星号与单位后缀 */
.frow-label .req { color: #d9534f; }
/* 窄屏：标签叠到控件上方，仍是同一个表格单元格，不做圆角/间距 */
@media (max-width: 767.98px) {
    .frow { flex-direction: column; align-items: stretch; }
    .frow-label {
        flex: none;
        justify-content: flex-start;
        text-align: left;
        border-right: none;
        border-bottom: 1px solid var(--qms-grid-line, #9CC2E0);
        padding: 4px 8px;
    }
    /* 兼容仍用 Bootstrap 列的旧表单：手机上强制整行，避免半宽溢出 */
    .form-section-body .row > [class*="col-"] { width: 100%; max-width: 100%; min-width: 0; }
}
/* 打印：折叠状态不影响输出，所有分区内容都要打出来 */
@media print {
    .form-section > .form-section-body { display: block !important; }
}

/* ============================================================
   侧边栏：桌面端「右侧浅色浮层」（贴参考图1 协同 BPM 门户式）
   移动端（≤991.98px）保持原生 accordion 抽屉，不使用浮层
   ============================================================ */
.side-flyout {
    position: fixed;
    width: 240px;
    /* 浅色内容区上做浮层：用冷色渐变与纯白内容区分，避免两片白面糊在一起 */
    background: linear-gradient(180deg, #ffffff 0%, #e9f1f9 100%);
    border: 1px solid #aebccd;          /* 加深边框，边缘更清晰 */
    /* border-top: 3px solid var(--qms-primary, #1c4f7c);  品牌色顶边，强化辨识度并与深色侧栏呼应 */
    border-radius: 10px;
    /* 双层阴影：大范围弥散 + 近距投影，明显"浮起"于内容区 */
    box-shadow: 0 14px 44px rgba(15, 30, 50, .22), 0 4px 12px rgba(15, 30, 50, .14);
    z-index: 30;                 /* 高于顶部栏 z-index:20 */
    padding: 8px;
}
.side-flyout[hidden] { display: none; }
.side-flyout-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 8px 8px;
    margin-bottom: 6px;
    border-bottom: 1px solid #d4dce6;
}
.side-flyout-head strong { font-size: var(--qms-fs-sm); color: #1b2b3d; }
.side-flyout-close {
    border: none; background: transparent; cursor: pointer;
    font-size: 18px; line-height: 1; color: #8a97a6; padding: 0 4px;
}
.side-flyout-close:hover { color: #d9534f; }
.side-flyout-list { display: flex; flex-direction: column; }
.side-flyout-list a.side-link {
    color: #33445a; background: transparent;
    padding: 8px 10px; border-radius: 6px; font-size: var(--qms-fs-sm);
}
.side-flyout-list a.side-link:hover { background: #eef2f7; color: var(--qms-primary, #1c4f7c); }
.side-flyout-list a.side-link.active { background: var(--qms-primary, #1c4f7c); color: #fff; }

/* 桌面端：被浮层接管的模块在侧栏内高亮（原生 accordion 不展开） */
.side-group.flyout-active > summary { background: rgba(255, 255, 255, .12); color: #fff; }
.side-group.flyout-active > summary .caret { transform: rotate(90deg); }

/* 桌面端：侧栏子菜单一律不就地展开（由右侧浮层承载）；
   同时消除模板渲染 <details open> 在脚本剥离前的加载闪现。 */
@media (min-width: 992px) {
    .side-group .side-sub { display: none !important; }
}

@media (max-width: 991.98px) {
    .side-flyout { display: none !important; }
}

/* ============================================================
   系统对接控制台（/admin/integration）

   这一页的目标用户是"没做过对接"的工程师，所以视觉上刻意做两件事：
   1. 用状态灯与指标卡代替日志术语，先给结论再给细节；
   2. 用步骤条把"要填五步"说清楚，避免填到一半不知道还剩多少。
   ============================================================ */
.int-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.int-metric {
    background: #fff;
    border: 1px solid var(--qms-border);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.int-metric-label { color: #6b7886; font-size: var(--qms-fs-xs); }
.int-metric-value { font-size: 24px; font-weight: 600; color: var(--qms-navy); line-height: 1.2; }

.int-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.int-card {
    background: #fff;
    border: 1px solid var(--qms-border);
    border-radius: 10px;
    padding: 14px 16px;
}
.int-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.int-card-name {
    font-size: var(--qms-fs-title);
    font-weight: 600;
    color: var(--qms-navy);
    text-decoration: none;
}
.int-card-name:hover { text-decoration: underline; }
.int-card-meta { color: #6b7886; font-size: var(--qms-fs-xs); margin-top: 6px; }
.int-card-stats {
    display: flex; gap: 16px; flex-wrap: wrap;
    margin: 10px 0; padding: 8px 0;
    border-top: 1px dashed var(--qms-border);
    border-bottom: 1px dashed var(--qms-border);
    font-size: var(--qms-fs-sm);
}
.int-card-stats strong { color: var(--qms-navy); }
.int-card-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.int-card-foot form { display: inline-flex; }

/* 模板库按系统类型分节（模板 20+ 时平铺一墙分不清系统） */
.int-tpl-nav {
    display: flex; flex-wrap: wrap; gap: 6px;
    padding: 8px 10px;
    background: #fff;
    border: 1px solid var(--qms-border);
    border-radius: 10px;
}
.int-tpl-chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px;
    border: 1px solid var(--qms-border);
    border-radius: 999px;
    font-size: var(--qms-fs-xs);
    color: #4b5a68;
    text-decoration: none;
    background: #f7fafd;
}
.int-tpl-chip span {
    font-size: 11px; color: #6b7886;
    background: #eaf1f8; border-radius: 999px;
    padding: 0 5px; line-height: 15px;
}
.int-tpl-chip:hover { border-color: var(--qms-bar); color: var(--qms-bar); }
.int-tpl-chip.is-on { background: var(--qms-bar); border-color: var(--qms-bar); color: #fff; }
.int-tpl-chip.is-on span { background: rgba(255,255,255,.28); color: #fff; }
.int-tpl-sec { margin-bottom: 18px; scroll-margin-top: 64px; }
.int-tpl-sec-head {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    margin: 0 0 8px;
    padding-left: 8px;
    border-left: 3px solid var(--qms-bar);
}
.int-tpl-sec-head h2 {
    font-size: var(--qms-fs-title);
    font-weight: 600;
    color: var(--qms-navy);
    margin: 0;
}
.int-tpl-sec-head .badge { font-weight: 400; }

.int-dot {
    width: 9px; height: 9px; border-radius: 50%;
    flex: 0 0 auto; display: inline-block;
}
.int-dot-green { background: #2e9e5b; }
.int-dot-amber { background: #d9920b; }
.int-dot-red   { background: #d64545; }
.int-dot-gray  { background: #a7b0ba; }

.int-empty { text-align: center; padding: 40px 16px; }
.int-empty h3 { font-size: var(--qms-fs-title); margin-bottom: 8px; }

/* ---------------- 步骤条 ---------------- */
.int-steps {
    display: flex; flex-wrap: wrap; gap: 6px;
    list-style: none; margin: 0 0 16px; padding: 0;
}
.int-step {
    display: flex; align-items: center; gap: 7px;
    padding: 7px 14px 7px 8px;
    background: #fff; border: 1px solid var(--qms-border);
    border-radius: 999px; color: #6b7886;
    font-size: var(--qms-fs-sm);
}
.int-step-no {
    width: 20px; height: 20px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: #eef2f7; color: #5a6a7a; font-size: var(--qms-fs-xs);
}
.int-step.is-current {
    border-color: var(--qms-bar); color: var(--qms-navy);
    box-shadow: 0 0 0 2px rgba(30, 123, 187, .12);
}
.int-step.is-current .int-step-no { background: var(--qms-bar); color: #fff; }
.int-step.is-done { color: #2e7d55; border-color: #cfe6d9; }
.int-step.is-done .int-step-no { background: #e3f3ea; color: #2e7d55; }

/* ---------------- 系统类型卡片 ---------------- */
.int-kinds {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.int-kind {
    position: relative;
    display: flex; flex-direction: column; gap: 4px;
    padding: 14px;
    border: 1px solid var(--qms-border);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}
.int-kind input { position: absolute; opacity: 0; pointer-events: none; }
.int-kind-name { font-weight: 600; color: var(--qms-navy); }
.int-kind-desc { color: #6b7886; font-size: var(--qms-fs-xs); }
.int-kind:hover { border-color: var(--qms-accent); }
.int-kind:has(input:checked) {
    border-color: var(--qms-bar);
    box-shadow: 0 0 0 2px rgba(30, 123, 187, .14);
    background: #f7fbfe;
}

/* ---------------- 表单单选 ---------------- */
.int-radio {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 10px 12px; border: 1px solid var(--qms-border);
    border-radius: 8px; margin-bottom: 10px; cursor: pointer;
}
.int-radio em {
    display: block; font-style: normal; color: #6b7886;
    font-size: var(--qms-fs-xs); margin-top: 2px;
}
.int-radio:has(input:checked) { border-color: var(--qms-bar); background: #f7fbfe; }
.int-confirm {
    display: block; margin-top: 8px; padding: 9px 12px;
    background: #fff6e5; border: 1px solid #f0d9a8; border-radius: 8px;
    font-size: var(--qms-fs-sm); color: #8a5a00;
}

/* ---------------- 操作条 ---------------- */
.int-actions {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 12px 0 24px;
}
.int-actions form { display: inline-flex; gap: 8px; }

/* ---------------- 字段映射 ---------------- */
.int-field-key {
    color: #9aa4b0; font-size: 11px; font-family: Consolas, monospace;
}
.int-map-table td { vertical-align: middle; }
.int-map-table tr.is-missing > td { background: #fdf1f1; }
.int-map-table tr.is-missing input[name^="ext_"] { border-color: #d64545; }
.int-sample { margin-bottom: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.int-sample-box { flex: 1 1 100%; }

/* ---------------- 令牌与自测 ---------------- */
.int-secret {
    border: 1px dashed #d9b25f; background: #fffaf0;
    border-radius: 8px; padding: 12px 14px;
}
.int-secret-label { font-size: var(--qms-fs-xs); color: #8a5a00; margin-bottom: 6px; }
.int-secret-value {
    display: inline-block; padding: 6px 10px; background: #fff;
    border: 1px solid #e6d3a8; border-radius: 6px;
    word-break: break-all; font-size: var(--qms-fs-sm); flex: 1 1 320px;
}
.int-checks { list-style: none; margin: 0; padding: 0; }
.int-checks li {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    padding: 8px 12px; border: 1px solid var(--qms-border);
    border-radius: 8px; margin-bottom: 8px; background: #fff;
}
.int-checks li.is-ok { border-color: #cfe6d9; background: #f6fcf8; }
.int-checks li.is-bad { border-color: #f0c9c9; background: #fdf6f6; }
.int-check-mark {
    width: 18px; height: 18px; border-radius: 50%; flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; color: #fff; background: #2e9e5b;
}
.int-checks li.is-bad .int-check-mark { background: #d64545; }
.int-check-label { font-weight: 600; }
.int-check-detail { color: #5a6a7a; font-size: var(--qms-fs-sm); }
.int-check-hint {
    flex: 1 1 100%; color: #a33; font-size: var(--qms-fs-xs);
    padding-left: 26px;
}

.code-box {
    background: #1f2a36; color: #dbe6f0;
    border-radius: 8px; padding: 12px 14px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px; line-height: 1.6;
    overflow: auto; max-height: 320px;
    white-space: pre; margin: 0;
}

.int-summary { margin: 0; padding-left: 18px; }
.int-summary li { margin-bottom: 6px; }
.int-perm-list, .int-entity-list { list-style: none; margin: 0; padding: 0; }
.int-perm-list li, .int-entity-list li {
    padding: 7px 0; border-bottom: 1px dashed var(--qms-border);
    font-size: var(--qms-fs-sm);
}
.int-perm-list li:last-child, .int-entity-list li:last-child { border-bottom: 0; }
.int-map-summary {
    padding: 10px 0; border-bottom: 1px dashed var(--qms-border);
}
.int-map-summary:last-child { border-bottom: 0; }

.int-tabs .nav-link {
    font-size: var(--qms-fs-sm); padding: 5px 14px;
    color: #4a5a6a; border-radius: 999px;
}
.int-tabs .nav-link.active { background: var(--qms-bar); color: #fff; }

@media (max-width: 1199.98px) {
    .int-kinds { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 991.98px) {
    .int-cards { grid-template-columns: 1fr; }
    .int-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .int-kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
    .int-kinds { grid-template-columns: 1fr; }
    .int-steps { gap: 4px; }
    .int-step { padding: 5px 10px 5px 6px; font-size: var(--qms-fs-xs); }
    .int-step-label { display: none; }
    .int-step.is-current .int-step-label { display: inline; }
}

/* ---------------- P2/P3/P4：健康度、调试台、出站、日志 ---------------- */
.int-metrics-sm { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.int-metrics-sm .int-metric { padding: 8px 10px; }
.int-metrics-sm .int-metric-value { font-size: 20px; }

.int-seg {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--qms-border);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.int-seg a {
    padding: 3px 10px;
    font-size: var(--qms-fs-xs);
    color: #5a6a7a;
    text-decoration: none;
    border-right: 1px solid var(--qms-border);
    white-space: nowrap;
}
.int-seg a:last-child { border-right: 0; }
.int-seg a:hover { background: #f4f8fc; color: var(--qms-navy); }
.int-seg a.active { background: var(--qms-bar); color: #fff; }

.int-spark {
    display: flex;
    align-items: flex-end;
    gap: 1px;
    height: 56px;
    margin-top: 12px;
    padding: 0 2px;
    border-bottom: 1px solid var(--qms-border);
}
.int-spark-col {
    flex: 1 1 0;
    min-width: 0;
    height: 100%;
    display: flex;
    align-items: flex-end;
}
.int-spark-bar {
    display: block;
    width: 100%;
    min-height: 2px;
    background: #bcd7ea;
    border-radius: 2px 2px 0 0;
}
.int-spark-bar.has-fail { background: #e08a8a; }

.int-error-list { list-style: none; padding: 0; margin: 0; }
.int-error-list li { padding: 7px 0; border-bottom: 1px dashed #eef1f5; }
.int-error-list li:last-child { border-bottom: 0; }
.int-fix { color: #2e7d55; }
.int-sub-title {
    font-weight: 600;
    color: var(--qms-navy);
    font-size: var(--qms-fs-sm);
    margin-bottom: 6px;
}

.int-kv {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 5px 0;
    border-bottom: 1px dashed #eef1f5;
    font-size: var(--qms-fs-sm);
}
.int-kv:last-child { border-bottom: 0; }
.int-kv > span:first-child { color: #6b7886; flex: 0 0 auto; }

.int-tip {
    background: #f2f8fd;
    border: 1px solid #d6e8f6;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: var(--qms-fs-sm);
    color: #33556f;
}
.int-tip a { color: var(--qms-primary); }

.int-log-detail summary { cursor: pointer; }
.int-log-detail[open] summary { margin-bottom: 4px; }
.code-input { font-family: Consolas, Monaco, "Courier New", monospace; font-size: var(--qms-fs-xs); }

.int-card-health {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: var(--qms-fs-xs);
    color: #5a6a7a;
}

@media (max-width: 991.98px) {
    .int-metrics-sm { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .int-spark { height: 44px; }
}
.int-console-err {
    border: 1px solid #f0c9c9;
    background: #fdf6f6;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 8px;
}

/* 出站队列：6 列在窄栏里必须允许换行，否则操作按钮会被panel裁掉 */
.int-outbox-table { white-space: normal; }
.int-outbox-table th, .int-outbox-table td { padding: 7px 6px; }
.int-outbox-table td[data-label="操作"] { white-space: nowrap; }
.int-outbox-table td[data-label="操作"] form { display: inline-flex; margin-right: 4px; }
.int-outbox-table td[data-label="结果"] { word-break: break-all; }
.int-outbox-table th { white-space: nowrap; }
.int-outbox-table td[data-label="时间"] { white-space: nowrap; }

/* ============================================================
   审批流可视化编辑器（2026-11）
   ------------------------------------------------------------
   三段式：流程图（只读预览）→ 节点卡片（可编辑）→ 常驻保存栏。
   节点卡片横向放不下时按 wf-node-grid 自动降列，不靠媒体查询。
   ============================================================ */
.wf-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px 14px;
}
.wf-field { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.wf-field-wide { grid-column: 1 / -1; }
.wf-field-check { justify-content: flex-start; }
.wf-label {
    font-size: var(--qms-fs-xs);
    color: #6B6B63;
    line-height: 1.4;
    font-weight: 400;
}
.wf-checks { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; min-height: 31px; }

/* ---------- 流程图 ---------- */
.wf-flow {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 6px;
    padding: 10px 2px;
}
.wf-state {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border: 1px solid #cddceb;
    background: #f2f7fc;
    border-radius: 6px;
    font-size: var(--qms-fs-sm);
    color: #23445f;
    white-space: nowrap;
}
.wf-state.is-initial {
    border-color: var(--qms-bar);
    background: #e6f2fb;
    font-weight: 600;
}
.wf-state.is-final {
    border-color: #b7ddc4;
    background: #eef8f1;
    color: #1f6b3c;
}
.wf-tag {
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 8px;
    background: var(--qms-bar);
    color: #fff;
    line-height: 1.5;
}
.wf-tag.is-end { background: #2f9e5f; }
.wf-arrow {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 74px;
    padding: 0 2px;
}
.wf-arrow-label {
    font-size: 11px;
    color: #5a6a7a;
    text-align: center;
    line-height: 1.25;
    max-width: 130px;
    word-break: break-all;
}
.wf-arrow-line { color: #9ab0c4; font-size: 15px; line-height: 1; }

.wf-branches {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    padding-top: 8px;
    border-top: 1px dashed var(--qms-border);
}
.wf-branch {
    font-size: var(--qms-fs-xs);
    background: #fbf3f3;
    border: 1px solid #f0d3d3;
    color: #8a3d3d;
    border-radius: 12px;
    padding: 3px 9px;
}
.wf-branch em { font-style: normal; color: #a06a6a; margin-left: 4px; }
.wf-branch-arrow { color: #c07373; }

/* ---------- 节点卡片 ---------- */
.wf-node {
    border: 1px solid var(--qms-border);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
    background: #fcfdff;
}
.wf-node:hover { border-color: #c6d9ea; }
.wf-node-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.wf-node-seq {
    font-size: var(--qms-fs-xs);
    color: #6B6B63;
    min-width: 26px;
}
.wf-in-action { max-width: 170px; }
.wf-in-label { max-width: 240px; }
.wf-node-tools { display: inline-flex; gap: 4px; margin-left: auto; }
.wf-node-tools .btn { padding: 1px 8px; line-height: 1.5; }

.wf-node-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px 12px;
}

.wf-roles {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px 7px;
    margin-top: 9px;
    padding-top: 9px;
    border-top: 1px dashed var(--qms-border);
}
.wf-roles .wf-label { margin-right: 2px; }
.wf-role {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--qms-fs-xs);
    border: 1px solid #dbe4ec;
    background: #fff;
    border-radius: 12px;
    padding: 2px 9px;
    cursor: pointer;
    margin: 0;
    white-space: nowrap;
}
.wf-role input { margin: 0; }
.wf-role.is-sentinel { border-color: #cfe0f0; background: #f4f9fd; }
.wf-role:has(input:checked) {
    border-color: var(--qms-bar);
    background: #e8f3fc;
    color: #14557f;
    font-weight: 600;
}
.wf-role-sep { width: 1px; height: 18px; background: var(--qms-border); margin: 0 2px; }

.wf-advanced { margin-top: 9px; }
.wf-advanced > summary {
    font-size: var(--qms-fs-xs);
    color: #5a6a7a;
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.wf-advanced > summary::-webkit-details-marker { display: none; }
.wf-advanced > summary::before { content: '▸ '; color: #9ab0c4; }
.wf-advanced[open] > summary::before { content: '▾ '; }
.wf-advanced .wf-node-grid { margin-top: 8px; }

/* ---------- 常驻保存栏（在 .panel 之外，否则 overflow 会毁掉 sticky） ---------- */
.wf-savebar {
    position: sticky;
    bottom: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    margin-top: 4px;
    background: #fff;
    border: 1px solid var(--qms-border);
    border-radius: 8px;
    box-shadow: 0 -6px 18px rgba(27, 43, 61, .08);
}

@media (max-width: 767.98px) {
    .wf-node-head { flex-wrap: wrap; }
    .wf-in-action, .wf-in-label { max-width: none; flex: 1 1 120px; }
    .wf-node-tools { margin-left: 0; width: 100%; justify-content: flex-end; }
    .wf-flow { gap: 4px; }
    .wf-arrow { min-width: 46px; }
    .wf-arrow-label { max-width: 80px; }
    .wf-savebar { flex-wrap: wrap; }
}

/* ============================================================
   系统管理首页（2026-11）
   ============================================================ */
.adm-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}
.adm-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--qms-border);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
}
.adm-stat:hover { border-color: #bcd4e8; background: #fbfdff; }
.adm-stat-num { font-size: 26px; font-weight: 600; color: var(--qms-navy); line-height: 1.2; }
.adm-stat-label { font-size: var(--qms-fs-xs); color: #6B6B63; }

.adm-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
}
.adm-link {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border: 1px solid var(--qms-border);
    border-left: 3px solid var(--qms-bar);
    border-radius: 6px;
    background: #fcfdff;
    text-decoration: none;
    color: inherit;
}
.adm-link:hover { background: #f5faff; border-color: #bcd4e8; border-left-color: var(--qms-accent); }
.adm-link strong { font-size: var(--qms-fs-base); color: #1d3550; font-weight: 600; }
.adm-link span { font-size: var(--qms-fs-xs); color: #6B6B63; line-height: 1.5; }

/* 流程清单表格
   ------------------------------------------------------------
   全局 .data-table 是 nowrap，长描述会把「流程」列顶到溢出面板；
   这里固定布局 + 允许换行。列宽写在类里（不写内联 style），
   容器变窄时才能整体收窄 —— 第一列不给宽度，永远吃掉剩余空间，
   避免被固定列宽挤成「一字一行」。 */
.wf-table { table-layout: fixed; }
.wf-table th, .wf-table td { white-space: normal; }
.wf-table th { white-space: nowrap; }          /* 表头不折行：「版本」会拆成上下两字 */
.wf-table td.cell-code { white-space: nowrap; font-size: var(--qms-fs-xs); }

.wf-table .wf-c-code { width: 130px; }
.wf-table .wf-c-src { width: 90px; }
.wf-table .wf-c-chain { width: 140px; }
.wf-table .wf-c-nodes { width: 70px; }
.wf-table .wf-c-docs { width: 170px; }
.wf-table .wf-c-ver { width: 60px; }
.wf-table .wf-c-act { width: 80px; }

/* 侧栏 280px 是常驻的，判断依据是「内容区」而不是视口：
   1310px 视口只剩 1030 可用，按桌面列宽第一列只剩 200 上下。 */
@media (min-width: 861px) and (max-width: 1399.98px) {
    .wf-table .wf-c-code { width: 122px; }
    .wf-table .wf-c-src { width: 74px; }
    .wf-table .wf-c-chain { width: 108px; }
    .wf-table .wf-c-nodes { width: 58px; }
    .wf-table .wf-c-docs { width: 110px; }
    .wf-table .wf-c-ver { width: 52px; }
    .wf-table .wf-c-act { width: 68px; }
}
/* 内容区 < 850 时（视口约 1100 以下）连「影响的单据」也放不下：
   隐去它，让第一列保持 230+，比横向滚动更好读。编辑器里能看到完整绑定。 */
@media (min-width: 861px) and (max-width: 1099.98px) {
    .wf-table th.wf-c-docs,
    .wf-table td[data-label="影响的单据"] { display: none; }
}

/* 「状态链路」不能 nowrap：固定布局下超长内容会溢出到相邻列，
   表现为「4 个状态」和节点数糊在一起。允许换行比压字更可靠；
   节点数/操作是短内容，保持不换行。 */
.wf-table td[data-label="节点数"],
.wf-table td[data-label="操作"] { white-space: nowrap; }

.wf-table .wf-desc {
    font-size: var(--qms-fs-xs);
    color: #6B6B63;
    line-height: 1.5;
    margin-top: 2px;
    word-break: break-word;
}
.wf-flow-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wf-flow-cell > a { word-break: break-word; }

/* ============================================================
   会签与版本快照（2026-11）
   ============================================================ */
.wf-cs-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    margin-top: 8px;
    padding: 6px 10px;
    background: #fffdf5;
    border: 1px solid #f0e3bf;
    border-radius: 6px;
    font-size: var(--qms-fs-xs);
    color: #6b5a2e;
}
.wf-cs-badge {
    background: #b8860b;
    color: #fff;
    border-radius: 10px;
    padding: 1px 8px;
    font-weight: 600;
}
.wf-seat-tag {
    display: inline-block;
    margin-left: 4px;
    padding: 0 5px;
    border-radius: 8px;
    background: #fdf0d5;
    color: #8a6d1f;
    font-size: 10px;
    line-height: 1.6;
}

.wf-rev-table { table-layout: fixed; }
.wf-rev-table th, .wf-rev-table td { white-space: normal; }
.wf-rev-table td[data-label="版本"],
.wf-rev-table td[data-label="时间"],
.wf-rev-table td[data-label="操作人"],
.wf-rev-table td[data-label="类型"],
.wf-rev-table td[data-label="节点数"],
.wf-rev-table td[data-label="#"] { white-space: nowrap; }
.wf-rev-summary {
    color: #4a5a6a;
    font-size: var(--qms-fs-xs);
    line-height: 1.6;
    word-break: break-word;
}
.wf-rev-summary-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    background: #fbfdff;
    border: 1px solid var(--qms-border);
    border-left: 3px solid var(--qms-bar);
    border-radius: 6px;
    font-size: var(--qms-fs-sm);
    line-height: 1.6;
}
