:root {
    --底色: #0b0f16;
    --卡片色: #121824;
    --卡片描边: #1f2a3a;
    --主色: #4c8dff;
    --主色浅: #6ea6ff;
    --成功色: #35c98a;
    --警示色: #ffb454;
    --错误色: #ff6b6b;
    --文字: #e6edf7;
    --次要文字: #8fa0b8;
    --代码底: #0a0e14;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(1200px 600px at 12% -10%, rgba(76, 141, 255, 0.16), transparent 60%),
        radial-gradient(900px 500px at 92% 0%, rgba(53, 201, 138, 0.10), transparent 55%),
        var(--底色);
    color: var(--文字);
    font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.6;
}

.页面容器 {
    max-width: 1420px;
    margin: 0 auto;
    padding: 20px 24px 20px;
}

.顶栏 {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.标题组 h1 {
    margin: 0;
    font-size: 25px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.标题组 h1 span {
    color: var(--主色浅);
}

.标题组 p {
    margin: 6px 0 0;
    color: var(--次要文字);
    font-size: 13px;
}

.本地标签 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border: 1px solid rgba(53, 201, 138, 0.35);
    border-radius: 999px;
    background: rgba(53, 201, 138, 0.10);
    color: var(--成功色);
    font-size: 12px;
    white-space: nowrap;
}

.本地标签::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--成功色);
    box-shadow: 0 0 8px var(--成功色);
}

/* ---------- 卡片内部通用 ---------- */

.卡片头 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.功能序号 {
    flex: none;
    padding: 3px 10px;
    border-radius: 8px;
    background: rgba(76, 141, 255, 0.16);
    border: 1px solid rgba(76, 141, 255, 0.35);
    color: var(--主色浅);
    font-size: 12px;
    font-weight: 600;
}

.卡片头 h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
}

.范围简述 {
    padding-left: 12px;
    border-left: 1px solid #2a3648;
    color: var(--次要文字);
    font-size: 12.5px;
    font-weight: 400;
}

.范围简述 b {
    color: #c7d6ea;
    font-weight: 600;
}

.卡片头 + .操作区 {
    margin-top: 12px;
}

.范围说明 {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-left: 3px solid var(--主色);
    border-radius: 0 10px 10px 0;
    background: rgba(76, 141, 255, 0.07);
    color: var(--次要文字);
    font-size: 13px;
}

.范围说明 b {
    color: var(--文字);
    font-weight: 600;
}

.操作区 {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.按钮 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 20px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    user-select: none;
}

.按钮:active {
    transform: translateY(1px);
}

.按钮.主按钮 {
    background: linear-gradient(180deg, var(--主色浅), var(--主色));
    color: #ffffff;
    box-shadow: 0 8px 22px rgba(76, 141, 255, 0.32);
}

.按钮.主按钮:hover {
    box-shadow: 0 10px 26px rgba(76, 141, 255, 0.45);
}

.按钮.次按钮 {
    background: rgba(255, 255, 255, 0.05);
    border-color: #2a3648;
    color: var(--文字);
}

.按钮.次按钮:hover {
    border-color: #3d5372;
    background: rgba(255, 255, 255, 0.08);
}

.按钮.小按钮 {
    height: 30px;
    padding: 0 12px;
    font-size: 12px;
    border-radius: 8px;
}

.按钮:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

.文件信息 {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--次要文字);
    font-size: 13px;
    min-height: 22px;
}

/* 操作区内的文件信息与按钮同一行显示 */
.操作区 .文件信息 {
    margin-top: 0;
    flex: 1 1 260px;
    min-width: 0;
    font-size: 12.5px;
}

.操作区 .文件链接 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.文件名 {
    color: var(--文字);
    font-weight: 600;
    word-break: break-all;
}

.文件链接 {
    color: var(--主色浅);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dashed rgba(110, 166, 255, 0.5);
    word-break: break-all;
    cursor: pointer;
}

.文件链接:hover {
    color: #a9c8ff;
    border-bottom-color: #a9c8ff;
}

.链接提示 {
    color: #5d6f88;
    font-size: 12px;
}

.分隔点 {
    color: #3a4a60;
}

.状态条 {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    display: none;
}

.状态条.显示 {
    display: block;
}

.状态条.加载 {
    background: rgba(76, 141, 255, 0.10);
    border: 1px solid rgba(76, 141, 255, 0.28);
    color: var(--主色浅);
}

.状态条.成功 {
    background: rgba(53, 201, 138, 0.10);
    border: 1px solid rgba(53, 201, 138, 0.30);
    color: var(--成功色);
}

.状态条.警告 {
    background: rgba(255, 180, 84, 0.10);
    border: 1px solid rgba(255, 180, 84, 0.30);
    color: var(--警示色);
}

.状态条.错误 {
    background: rgba(255, 107, 107, 0.10);
    border: 1px solid rgba(255, 107, 107, 0.30);
    color: var(--错误色);
}

.结果区 {
    margin-top: 14px;
    border: 1px solid var(--卡片描边);
    border-radius: 14px;
    overflow: hidden;
    background: var(--代码底);
    display: none;
}

.结果区.显示 {
    display: block;
}

.结果头 {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--卡片描边);
}

/* 按钮已并入汇总头部或 tips 前导行时，隐藏空的结果头 */
#结果区 .结果头:not(:has(button)),
#附加页区 .结果头:not(:has(button)) {
    display: none;
}

.结果内容 {
    padding: 10px 12px 12px;
}

.结果头标题 {
    margin-right: auto;
    color: var(--次要文字);
    font-size: 12.5px;
    letter-spacing: 0.3px;
}

/* ---------- 附加页明细表格 ---------- */

.附加页表格 th {
    border: 1px solid #33415a;
    padding: 5px 8px;
    background: #16202f;
    color: #cfe0f7;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    white-space: normal;
    word-break: break-word;
}

.附加页表格 td {
    cursor: text;
    vertical-align: middle;
    white-space: pre;
    word-break: normal;
}

/* ---------- 报关单识别表格（还原原 PDF 单元格网格） ---------- */

.核对页标题 {
    margin: 0 0 10px;
    color: var(--次要文字);
    font-size: 12px;
}

.核对表格容器 + .核对页标题 {
    margin-top: 22px;
}

/* 不在此处建立滚动容器，否则首行 sticky 会以它为准而失效；
   横向滚动交给外层 .结果内容 统一处理。 */
.核对表格容器 {
    overflow: visible;
}

/* 抬头超过 10 行时，表格容器内部纵向滚动，表头仍冻结 */
.核对表格容器.限高滚动 {
    max-height: 430px;
    overflow-y: auto;
}

.核对表格 {
    border-collapse: collapse;
    table-layout: fixed;
    width: 100%;
    font-size: 12.5px;
    line-height: 1.45;
    background: #0d1421;
}

.核对表格 td {
    border: 1px solid #33415a;
    padding: 3px 8px;
    vertical-align: top;
    color: #d7e3f4;
    white-space: pre-wrap;
    word-break: break-word;
    cursor: text;
    transition: background 0.12s ease, box-shadow 0.12s ease;
}

.核对表格 td:hover {
    background: rgba(76, 141, 255, 0.08);
}

.核对表格 td.编辑中 {
    background: rgba(76, 141, 255, 0.16);
    box-shadow: inset 0 0 0 1px var(--主色浅);
    outline: none;
}

/* ---------- 附加页：严格按 PDF 原始换行显示 ---------- */

.核对表格.附加页表格 {
    table-layout: auto;
    width: max-content;
    min-width: 100%;
}

.核对表格.附加页表格 td {
    white-space: pre;
    word-break: normal;
}

/* ---------- 附加页：表头上方的原始前导行（如 tips 合计行） ---------- */

.附加页前导 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    box-sizing: border-box;
    width: max-content;
    min-width: 100%;
    padding: 7px 8px 8px;
    background: #0d1421;
    border: 1px solid #33415a;
    border-bottom: none;
}

.附加页前导行 {
    flex: 0 1 auto;
    color: #cfe0f7;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre;
}

.附加页前导 .按钮 {
    flex: 0 0 auto;
}

/* 收窄列：版本号 / 危险货物信息 / 境内目的地（允许在这几列内折行） */
.核对表格.附加页表格 th[data-列名="版本号"],
.核对表格.附加页表格 td[data-列名="版本号"] {
    width: 64px;
    max-width: 64px;
    padding-left: 4px;
    padding-right: 4px;
    white-space: normal;
    word-break: break-all;
}

.核对表格.附加页表格 th[data-列名="危险货物信息"],
.核对表格.附加页表格 td[data-列名="危险货物信息"] {
    width: 84px;
    max-width: 84px;
    padding-left: 4px;
    padding-right: 4px;
    white-space: normal;
    word-break: break-all;
}

.核对表格.附加页表格 th[data-列名="境内目的地"],
.核对表格.附加页表格 td[data-列名="境内目的地"] {
    width: 96px;
    max-width: 96px;
    padding-left: 4px;
    padding-right: 4px;
    white-space: normal;
    word-break: break-all;
}

/* ---------- 首行冻结：滚动时表头保持可见 ---------- */

.附加页表格 thead th,
/* 报关单表格的行由脚本直接挂在 table 上，且前面有 colgroup，故用 first-of-type 定位第一行 */
.核对表格:not(.附加页表格) tr:first-of-type td {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #16202f;
}

.附加页表格 thead th {
    z-index: 3;
}

.核对表格:not(.附加页表格) tr:first-of-type td.行号列 {
    background: #101a28;
}

/* 冻结行悬浮时保持不透明，避免滚动内容透出 */
.核对表格:not(.附加页表格) tr:first-of-type td:hover {
    background: #1a2537;
}

/* 进口台账：列字母行与中文标题行一起冻结 */
.数据表 thead th {
    height: 30px;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 30px;
    box-sizing: border-box;
}

.数据表 tbody tr.原始表头 td {
    position: sticky;
    top: 30px;
    z-index: 2;
    background: #141e2c;
}

.数据表 tbody tr.原始表头 td.行号列 {
    left: 0;
    z-index: 3;
    background: #121a27;
}

/* 冻结标题行悬浮时保持不透明 */
.数据表 tbody tr.原始表头:hover td {
    background: #18243a;
}

.核对表格 col.行号列 {
    width: 44px;
}

.核对表格 td.行号列 {
    text-align: center;
    color: #6f819b;
    background: #101a28;
    font-variant-numeric: tabular-nums;
    cursor: default;
}

.核对表格 td.行号列:hover {
    background: #142033;
}

.核对表格 tr.核对未通过 td.行号列 {
    color: #ff8a8a;
    box-shadow: inset 3px 0 0 #ff6b6b;
}

.核对表格 tr.核对通过 td.行号列 {
    color: #46d39a;
    box-shadow: inset 3px 0 0 #46d39a;
}

.核对表格 td.行号列 .通过勾 {
    display: block;
    font-size: 10px;
    line-height: 1;
    color: #46d39a;
}

/* 所有核对按钮统一：不满足的单元格填充紫色（明显到一眼能看出来） */
.核对表格 td.核对不满足,
.核对表格 td.计量不一致 {
    background: rgba(168, 110, 255, 0.46);
    box-shadow: inset 0 0 0 1px rgba(205, 168, 255, 0.95),
        inset 0 0 14px rgba(168, 110, 255, 0.28);
    color: #f5edff;
}

.核对表格 td.核对不满足:hover,
.核对表格 td.计量不一致:hover {
    background: rgba(168, 110, 255, 0.60);
}

/* 核对一：合同协议号含多个值（a/b/c）时，单元格文字标黄提示 */
.核对表格 td.核对提醒 {
    color: #f5c542;
    font-weight: 600;
}

.核对表格 td.核对提醒.核对不满足 {
    background: rgba(168, 110, 255, 0.46);
    box-shadow: inset 0 0 0 1px rgba(205, 168, 255, 0.95),
        inset 3px 0 0 #f5c542,
        inset 0 0 14px rgba(168, 110, 255, 0.28);
    color: #ffe9a8;
}

.核对表格 tr.核对未匹配 td {
    background: rgba(255, 107, 107, 0.10);
    box-shadow: inset 0 0 0 1px rgba(255, 107, 107, 0.45);
}

.核对表格 tr.核对未匹配 td.行号列 {
    color: #ff8a8a;
    box-shadow: inset 3px 0 0 #ff6b6b;
}

/* ---------- 逐行核对汇总 ---------- */

.核对汇总 {
    margin: 0 0 10px;
    border: 1px solid var(--卡片描边);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
}

.核对汇总 > summary {
    position: relative;
    padding-right: 28px;
    cursor: pointer;
    list-style: none;
    border-bottom: none;
}

.核对汇总 > summary::-webkit-details-marker {
    display: none;
}

.核对汇总 > summary::after {
    content: "▸";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #7d8ba1;
    font-size: 11px;
}

.核对汇总[open] > summary {
    border-bottom: 1px solid var(--卡片描边);
}

.核对汇总[open] > summary::after {
    content: "▾";
}

.核对汇总头 b {
    color: var(--主色浅);
}

.核对汇总头 {
    padding: 8px 12px;
    font-size: 12.5px;
    line-height: 1.6;
    color: #eef3fb;
}

.核对汇总头 b.通过数字 {
    color: #46d39a;
}

.核对汇总头 b.未通过数字 {
    color: #ff6b6b;
}

.核对汇总 > summary.带复制按钮 {
    padding-right: 150px;
}

.核对汇总头 .汇总头按钮组 {
    position: absolute;
    right: 32px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 8px;
}

.核对汇总提示 {
    padding: 4px 12px;
    font-size: 11.5px;
    color: #6f819b;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.核对项块 {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.核对项 {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 3px 12px;
    font-size: 12px;
    line-height: 1.5;
    color: #eef3fb;
    cursor: pointer;
    user-select: none;
}

.核对项:hover {
    background: rgba(76, 141, 255, 0.07);
}

.核对项.已展开 {
    background: rgba(76, 141, 255, 0.10);
}

.核对项 .展开箭头 {
    flex: none;
    color: #6f819b;
    font-size: 10px;
}

.核对项详情 {
    margin: 0;
    padding: 6px 12px 10px 34px;
    border-top: 1px dashed rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
    font-size: 12px;
    line-height: 1.6;
    color: #b8c7db;
    white-space: pre-wrap;
    word-break: break-word;
    user-select: text;
}

.核对项详情.隐藏 {
    display: none;
}

.核对项 .规则号 {
    flex: 0 0 126px;
    color: #e2ebf7;
}

.核对项 .状态 {
    flex: 0 0 46px;
    font-weight: 600;
}

.核对项 .状态.通过 {
    color: #46d39a;
}

.核对项 .状态.未通过 {
    color: #ff6b6b;
}

.核对项 .状态.未找到 {
    color: #f0b45b;
}

.核对项 .说明 {
    flex: 1;
    min-width: 0;
    color: #cbd8e9;
    word-break: break-word;
}

.核对项.未通过 {
    background: rgba(255, 107, 107, 0.06);
}

.占位 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 46px 20px;
    border: 1px dashed #243044;
    border-radius: 14px;
    margin-top: 20px;
    color: #5d6f88;
    font-size: 13px;
    text-align: center;
}

.占位.hidden {
    display: none;
}

.占位 .大文字 {
    font-size: 15px;
    color: #7d8ea7;
}

/* ---------- 悬浮提示浮层 ---------- */

.规则浮层 {
    position: fixed;
    z-index: 2000;
    width: max-content;
    min-width: 280px;
    max-width: 620px;
    max-height: 70vh;
    overflow: auto;
    border: 1px solid #33415a;
    border-radius: 10px;
    background: #0f1724;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6);
    color: var(--文字);
    user-select: text;
}

.规则浮层.隐藏 {
    display: none;
}

.规则浮层头 {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 6px 10px;
    border-bottom: 1px solid #223047;
    background: #131d2d;
    font-size: 11.5px;
    color: #8fa0b8;
}

.规则浮层复制 {
    flex: none;
    padding: 2px 10px;
    border: 1px solid #33415a;
    border-radius: 6px;
    background: rgba(76, 141, 255, 0.14);
    color: #a9c8ff;
    font-size: 11.5px;
    font-family: inherit;
    cursor: pointer;
}

.规则浮层复制:hover {
    background: rgba(76, 141, 255, 0.26);
}

.规则浮层内容 {
    margin: 0;
    padding: 8px 12px 10px;
    font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
    font-size: 13px;
    line-height: 1.7;
    color: #e9f1fb;
    white-space: pre-wrap;
    word-break: break-word;
    user-select: text;
    cursor: text;
}

/* 富文本悬浮明细：按块排版，项号/规则之间用虚线分隔，未通过原因标红 */
.规则浮层内容.富文本 {
    white-space: normal;
}

.规则浮层内容.富文本.紧凑 {
    white-space: pre;
}

.规则浮层内容 .浮层块 {
    margin: 0 0 4px;
}

.规则浮层内容 .浮层块头 {
    font-weight: 600;
}

.规则浮层内容 .浮层行 {
    margin: 1px 0;
}

.规则浮层内容 .浮层缩进 {
    padding-left: 14px;
}

/* 规则的判断条件与示例：比正文弱一档，长句自动换行 */
.规则浮层内容 .浮层条件,
.规则浮层内容 .浮层示例 {
    color: #a9bad2;
    font-size: 12.5px;
}

.规则浮层内容 .浮层分割线 {
    height: 0;
    margin: 7px 0;
    border: none;
    border-top: 1px dashed rgba(255, 255, 255, 0.3);
}

.规则浮层内容 .浮层红 {
    color: #ff6b6b;
    font-weight: 600;
}

.规则浮层内容 .浮层绿 {
    color: #46d39a;
    font-weight: 600;
}

/* tips 合计明细：字号略小，相加明细保持一行显示，超出时横向滚动 */
.规则浮层.紧凑 {
    width: min(94vw, 1080px);
    max-width: none;
}

.规则浮层内容.紧凑 {
    font-size: 11px;
    line-height: 1.6;
    white-space: pre;
}

/* tips 合计明细：tips 与台账用不同字体做“抬头”，便于区分来源 */
.合计标签-tips {
    font-family: Consolas, "Cascadia Mono", "Courier New", monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #6fd3ff;
}

.合计标签-台账 {
    font-family: "KaiTi", "STKaiti", "SimSun", serif;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #c9a4ff;
}

.合计数值 {
    font-family: Consolas, "Cascadia Mono", monospace;
    color: #f2f7ff;
}

.合计分隔 {
    color: #4a5c78;
}

.合计列名 {
    color: #b9a8e6;
}

.合计说明 {
    color: #8fa0b8;
}

.合计明细 {
    font-family: Consolas, "Cascadia Mono", monospace;
    color: #9fe0b0;
}

.合计结果 {
    color: #ffffff;
    font-weight: 700;
}

.合计提示通过 {
    color: #46d39a;
    font-weight: 600;
}

.合计提示未通过 {
    color: #ff9b9b;
    font-weight: 600;
}

.合计原因 {
    color: #ffb3c0;
}

/* ---------- 单页流程：进口台账结果区 ---------- */

#台账区 .结果头 .文件信息 {
    margin-top: 0;
    font-size: 12.5px;
}

#台账区 .状态条 {
    margin: 10px 12px 0;
}

#台账区 .表格区 {
    margin-top: 0;
    border: none;
    border-radius: 0;
}

/* ---------- 窗口标签（报关单 / 附加页 / 进口台账） ---------- */

.文件链接组 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.文件链接组 .文件链接项 {
    padding: 5px 11px;
    border: 1px solid #243044;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    font-size: 12.5px;
    line-height: 1.5;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.文件链接组 .文件链接项.未选择 {
    color: #5d6f88;
}

.文件链接组 .文件链接 {
    color: #8db7ff;
    text-decoration: none;
    border-bottom: 1px dashed rgba(141, 183, 255, 0.45);
}

.文件链接组 .文件链接:hover {
    color: #b9d4ff;
    border-bottom-color: #b9d4ff;
}

.窗口标签栏 {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
    border-bottom: 1px solid var(--卡片描边);
}

.窗口标签 {
    position: relative;
    padding: 8px 18px;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    background: transparent;
    color: var(--次要文字);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.窗口标签:hover:not(.禁用):not(.激活) {
    background: rgba(255, 255, 255, 0.05);
    color: var(--文字);
}

.窗口标签.激活 {
    background: rgba(76, 141, 255, 0.16);
    border-color: var(--卡片描边);
    color: #ffffff;
}

.窗口标签.激活::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: var(--主色);
}

.窗口标签.禁用 {
    opacity: 0.40;
    cursor: not-allowed;
}

.窗口网格 {
    display: block;
    margin-top: 0;
}

.窗口网格 .结果窗口 {
    display: none;
    flex-direction: column;
    min-width: 0;
    border: 1px solid var(--卡片描边);
    border-top: none;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    background: var(--代码底);
}

.窗口网格 .结果窗口.显示.激活 {
    display: flex;
}

.窗口网格 .结果窗口 .结果头 {
    justify-content: flex-end;
}

.窗口网格 .结果窗口 .结果内容 {
    padding: 8px 10px 10px;
    overflow: auto;
    max-height: calc(100vh - 300px);
}

/* 台账只保留内层 .表格滚动 一个滚动容器，外层不再滚动，
   否则滚轮先滚外层，表头会整块被滚走。 */
.窗口网格 .结果窗口 .表格区 {
    overflow: hidden;
    max-height: none;
}

/* 单窗口全宽展示，仅对超宽表格保留最小列宽并由窗口内横向滚动兜底 */
.窗口网格 .结果窗口 .核对表格 {
    min-width: 640px;
}

.窗口网格 .结果窗口 .附加页表格 {
    min-width: 960px;
}

.窗口网格 .结果窗口 .附加页前导 {
    min-width: 960px;
}

.窗口网格 .结果窗口 .数据表 {
    min-width: 520px;
}

/* 件数 / 毛重 / 净重的数值：每个数字单独一圈加粗红色虚线框 */
.核对表格 td.计量红框 {
    border: 2px dashed #ff4d4f;
    background: transparent;
}

/* 核对二通过：红色虚线框变黄色，并在框上方显示参与核对的数字 2 */
.核对表格 td.计量核对通过 {
    position: relative;
    border: 2px dashed #f5c542;
    background: rgba(245, 197, 66, 0.08);
}

.核对表格 td[data-核对次数="2"]::after,
.数据表 td.比对标题[data-核对次数="2"]::after {
    content: "2";
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0 5px;
    border-radius: 999px;
    background: #0d1421;
    color: #f5c542;
    font-size: 12px;
    font-weight: 700;
    line-height: 16px;
    pointer-events: none;
}

/* 进口台账标题行中参与比对的两列 */
.数据表 td.比对标题 {
    position: relative;
    border: 2px dashed #f5c542;
    background: rgba(245, 197, 66, 0.08);
    padding-top: 16px;
}

/* 台账标题格靠近滚动区顶部，数字 2 放在格内上方，避免被裁切 */
.数据表 td.比对标题[data-核对次数="2"]::after {
    top: 1px;
    line-height: 14px;
}

/* 进口台账中参与核对的列：悬浮查看两个数据来源 */
.数据表 th.比对提示,
.数据表 td.比对提示 {
    cursor: help;
}

/* ---------- 核对日志自动保存开关 ---------- */
.日志保存开关 {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    font-size: 13px;
    color: #9fb3cc;
    border: 1px dashed rgba(140, 180, 240, 0.35);
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
}

.日志保存开关:hover {
    color: #d7e3f4;
    border-color: rgba(160, 200, 255, 0.6);
}

.日志保存开关 input {
    margin: 0;
    accent-color: #4a90e2;
    cursor: pointer;
}

