/* 聚仁创新报表系统 样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; background: #F0F4F8; color: #1F2937; }

/* 登录 */
#loginMask { position: fixed; inset: 0; background: rgba(15, 23, 42, .55); display: flex; align-items: center; justify-content: center; z-index: 99; }
.login-box { background: #fff; border-radius: 12px; padding: 32px 36px; width: 340px; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.login-box h2 { font-size: 18px; margin-bottom: 20px; text-align: center; }
.login-box input { width: 100%; height: 38px; border: 1px solid #D1D5DB; border-radius: 6px; padding: 0 12px; margin-bottom: 12px; font-size: 14px; }
.login-box button { width: 100%; height: 40px; background: #2563EB; color: #fff; border: 0; border-radius: 6px; font-size: 15px; cursor: pointer; }
.login-box .err { color: #DC2626; font-size: 12px; min-height: 18px; margin-bottom: 8px; text-align: center; }

/* ================= 整体框架：左侧菜单 + 内容区 ================= */
#shell { display: flex; height: 100vh; }
.sidebar { width: 232px; flex: none; background: #1E3A5F; color: #fff; display: flex; flex-direction: column; }
.sb-logo { padding: 20px 20px 16px; font-size: 18px; font-weight: 700; line-height: 1.4; border-bottom: 1px solid rgba(255,255,255,.12); }
.sb-logo span { display: block; font-size: 12px; font-weight: 400; color: #B8C7DA; margin-top: 2px; }
.menu { flex: 1; overflow-y: auto; padding: 10px 0; }
.mg { padding: 12px 20px 5px; font-size: 11px; color: #7E96B4; letter-spacing: 1px; }
.mi { padding: 8px 20px 8px 28px; font-size: 13px; color: #D7E2EF; cursor: pointer; border-left: 3px solid transparent; }
.mi:hover { background: rgba(255,255,255,.07); }
.mi.active { background: #2563EB; color: #fff; border-left-color: #93C5FD; }
.sb-quit { padding: 12px 20px; font-size: 12px; color: #B8C7DA; cursor: pointer; border-top: 1px solid rgba(255,255,255,.12); }
.sb-quit:hover { color: #fff; }
.content { flex: 1; overflow: auto; }

.page { padding: 16px 20px; display: none; }
.page.active { display: block; }

/* 布局：左树右表单 */
.unit-wrap { display: grid; grid-template-columns: 1fr 360px; gap: 16px; }
.card { background: #fff; border: 1px solid #E2E8F0; border-radius: 10px; padding: 16px; }
.card h3 { font-size: 14px; color: #475569; margin-bottom: 12px; }
.todo-card { max-width: 520px; margin: 40px auto; text-align: center; padding: 36px; }

/* 树 */
.tree { max-height: calc(100vh - 130px); overflow: auto; font-size: 14px; }
.tnode { display: flex; align-items: center; padding: 4px 8px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.tnode:hover { background: #EFF6FF; }
.tnode.sel { background: #DBEAFE; outline: 1px solid #93C5FD; }
.tnode .tw { width: 18px; text-align: center; color: #94A3B8; cursor: pointer; user-select: none; flex: none; }
.tnode .code { color: #64748B; font-size: 12px; margin-right: 8px; font-family: Consolas, monospace; }
.tnode .nm { color: #1F2937; }

/* 按钮 */
.btn { display: inline-block; border: 0; border-radius: 6px; padding: 7px 14px; font-size: 13px; cursor: pointer; margin-right: 8px; }
.btn-p { background: #2563EB; color: #fff; }
.btn-g { background: #E2E8F0; color: #334155; }
.btn-r { background: #FEE2E2; color: #DC2626; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.toolbar { margin-bottom: 12px; }

/* 表单 */
.f-row { margin-bottom: 14px; }
.f-row label { display: block; font-size: 12px; color: #64748B; margin-bottom: 5px; }
.f-row input { width: 100%; height: 36px; border: 1px solid #D1D5DB; border-radius: 6px; padding: 0 10px; font-size: 14px; }
.f-row input[readonly] { background: #F1F5F9; color: #64748B; }
.preview { background: #F8FAFC; border: 1px dashed #CBD5E1; border-radius: 6px; padding: 10px 12px; font-size: 12px; color: #475569; line-height: 2; }
.preview b { color: #1D4ED8; font-family: Consolas, monospace; }
.hint { font-size: 12px; color: #94A3B8; line-height: 1.8; }
.msg { font-size: 12px; min-height: 18px; margin-top: 8px; }
.msg.ok { color: #059669; } .msg.err { color: #DC2626; }

/* 绑定三栏 */
.bind-wrap { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 14px; }
.bind-col { background: #fff; border: 1px solid #E2E8F0; border-radius: 10px; padding: 14px; display: flex; flex-direction: column; height: calc(100vh - 72px); min-height: 420px; overflow: hidden; }
.bind-col h3 { font-size: 14px; color: #475569; margin-bottom: 10px; height: 20px; flex: none; }
.bind-col .list { flex: 1; overflow: auto; border: 1px solid #EEF2F7; border-radius: 6px; }
.b-item { padding: 6px 10px; font-size: 13px; cursor: pointer; border-bottom: 1px solid #F1F5F9; }
.b-item:hover { background: #EFF6FF; }
.b-item.sel { background: #DBEAFE; }
.b-item .c { color: #64748B; font-size: 12px; font-family: Consolas, monospace; margin-right: 6px; }
.bind-actions { display: flex; align-items: center; gap: 10px; padding: 0 0 10px; height: 41px; flex: none; }
.bind-actions.placeholder { visibility: hidden; }
.hint-inline { font-size: 11px; color: #94A3B8; }
.search { width: 100%; height: 32px; border: 1px solid #D1D5DB; border-radius: 6px; padding: 0 10px; font-size: 13px; margin-bottom: 8px; flex: none; }
.mid-list .b-item .ind { color: #CBD5E1; font-family: monospace; white-space: pre; }
.count-badge { font-size: 11px; color: #94A3B8; font-weight: 400; }

/* ================= 报表看板（A002） ================= */
.rpt-head { display: flex; align-items: center; gap: 18px; background: #fff; border: 1px solid #E2E8F0; border-radius: 10px; padding: 10px 16px; margin-bottom: 12px; flex-wrap: wrap; }
.rpt-title { font-size: 15px; font-weight: 700; color: #1E3A5F; }
.rpt-filter { font-size: 12px; color: #64748B; display: flex; align-items: center; gap: 6px; }
.rpt-filter select { height: 32px; border: 1px solid #D1D5DB; border-radius: 6px; padding: 0 8px; font-size: 13px; max-width: 260px; }
.rpt-filter input { height: 32px; width: 70px; border: 1px solid #D1D5DB; border-radius: 6px; padding: 0 8px; font-size: 13px; background: #F1F5F9; color: #64748B; text-align: center; }
.rpt-range { font-size: 12px; color: #94A3B8; }

.rpt-wrap { background: #fff; border: 1px solid #E2E8F0; border-radius: 10px; overflow: auto; height: calc(100vh - 130px); }
.rpt-loading { padding: 40px; text-align: center; color: #94A3B8; font-size: 13px; }

.rpt { border-collapse: separate; border-spacing: 0; font-size: 12px; white-space: nowrap; }
.rpt th, .rpt td { border-right: 1px solid #E9EEF5; border-bottom: 1px solid #E9EEF5; padding: 4px 8px; }
.rpt thead th { position: sticky; z-index: 5; font-weight: 700; color: #334155; text-align: center; }
.rpt thead tr:first-child th { top: 0; height: 30px; font-size: 12px; }
.rpt thead tr:nth-child(2) th { top: 31px; height: 26px; font-weight: 400; color: #64748B; background: #F8FAFC; }

/* 分组带底色 */
.rpt .gA { background: #DBEAFE; }   /* 实际 */
.rpt .gB { background: #E9EEF5; }   /* 同期 */
.rpt .gC { background: #E7F6EC; }   /* 销售占比_实际 */
.rpt .gD { background: #F1F5F9; }   /* 销售占比_同期 */
.rpt .gs { border-left: 2px solid #94A3B8; }  /* 每组首列粗边框 */

/* 冻结前两列（编码、名称） */
.rpt .c-code { position: sticky; left: 0; min-width: 84px; z-index: 4; background: #fff; }
.rpt .c-name { position: sticky; left: 84px; min-width: 200px; z-index: 4; background: #fff; text-align: left; white-space: pre; }  /* pre：保留名称前的缩进空格 */
.rpt thead .c-code, .rpt thead .c-name { z-index: 6; background: #F1F5F9; }
.rpt td.n { text-align: right; font-family: Consolas, "Microsoft YaHei", monospace; }
.rpt td.total, .rpt th.total { background: #E5E7EB; }               /* *月本年合计列 灰底 */
.rpt .qsep { border-right: 1px solid #94A3B8; }                     /* 每满3个月 细分隔线 */
.rpt tr.key-row td { background: #E3F2D9; font-weight: 700; }       /* 关键项目行 浅绿底纹 */
.rpt tr.key-row td.c-code, .rpt tr.key-row td.c-name { background: #E3F2D9; }
.rpt tr.key-row td.total { background: #D7D9DD; }                   /* 关键行的合计列：深一点的灰 */
.rpt td .neg, .rpt td.neg { color: #DC2626; }                       /* 红字（仅指定编码负数） */
.rpt .hl { background: #FDE68A !important; }                        /* 十字高亮：单击行列深色 */

/* 面包屑（钻取路径） */
.crumb { font-size: 12px; color: #64748B; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.crumb .cr-i { cursor: pointer; padding: 2px 8px; border-radius: 4px; background: #EFF6FF; color: #1D4ED8; }
.crumb .cr-i:hover { background: #DBEAFE; }
.crumb .cr-i:last-child { background: #1E3A5F; color: #fff; cursor: default; }
.crumb .cr-sep { color: #CBD5E1; }

/* 钻取弹窗（单元格信息卡） */
.drill-pop { position: fixed; z-index: 95; background: #fff; border: 1px solid #CBD5E1; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 12px 14px; min-width: 300px; }
.drill-pop .dp-title { font-size: 14px; font-weight: 700; color: #1E3A5F; margin-bottom: 8px; }
.drill-pop .dp-line { font-size: 13px; color: #334155; margin-bottom: 4px; }
.drill-pop .dp-line b { color: #1F2937; }
.drill-pop .dp-cal { display: inline-block; min-width: 30px; font-weight: 700; color: #2563EB; }
.drill-pop .dp-diff { font-size: 12px; color: #B45309; margin: 2px 0 4px 38px; }
.drill-pop .dp-btns { margin-top: 10px; }
.drill-pop .dp-btns .btn { margin-right: 8px; }

/* 金额单元格可钻取 */
.rpt td.amt { cursor: pointer; }
.rpt td.amt:hover { outline: 2px solid #2563EB; outline-offset: -2px; }

/* 钻取弹框（下钻明细表） */
.dm-mask { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 85; display: flex; align-items: center; justify-content: center; }
.dm-panel { background: #F0F4F8; width: 97vw; height: 94vh; border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 16px 48px rgba(0,0,0,.3); }
.dm-head { display: flex; align-items: center; gap: 12px; padding: 10px 18px; background: #1E3A5F; color: #fff; flex: none; }
.dm-head .vc-close { margin-left: auto; cursor: pointer; font-size: 16px; color: #B8C7DA; padding: 2px 8px; }
.dm-head .vc-close:hover { color: #fff; }
.dm-body { flex: 1; overflow: auto; padding: 12px 14px; }
.dm-body .rpt { background: #fff; }

/* 凭证单元格详情弹窗 */
.cd-mask { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 100; display: flex; align-items: center; justify-content: center; }
.cd-panel { background: #fff; width: 640px; max-width: 92vw; max-height: 86vh; overflow: auto; border-radius: 12px; box-shadow: 0 16px 48px rgba(0,0,0,.3); }
.cd-head { display: flex; align-items: center; padding: 12px 18px; background: #1E3A5F; color: #fff; font-size: 14px; font-weight: 700; }
.cd-head .vc-close { margin-left: auto; cursor: pointer; color: #B8C7DA; padding: 2px 8px; }
.cd-head .vc-close:hover { color: #fff; }
.cd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; padding: 16px 18px; }
.cd-item label { display: block; font-size: 11px; color: #94A3B8; margin-bottom: 3px; }
.cd-item .cd-val { font-size: 13px; color: #1F2937; background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 6px; padding: 7px 10px; white-space: pre-wrap; word-break: break-all; line-height: 1.6; }
.cd-item.cd-full { grid-column: 1 / -1; }

/* 凭证明细模态框 */
.vc-mask { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 90; display: flex; align-items: center; justify-content: center; }
.vc-panel { background: #fff; width: 96vw; height: 92vh; border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 16px 48px rgba(0,0,0,.3); }
.vc-head { display: flex; align-items: center; gap: 14px; padding: 12px 18px; background: #1E3A5F; color: #fff; flex: none; }
.vc-head .vc-title { font-size: 14px; font-weight: 700; }
.vc-head .vc-sub { font-size: 12px; color: #B8C7DA; }
.vc-head .vc-close { margin-left: auto; cursor: pointer; font-size: 16px; color: #B8C7DA; padding: 2px 8px; }
.vc-head .vc-close:hover { color: #fff; }
.vc-body { flex: 1; overflow: auto; padding: 10px 14px; }
.vc-sum { font-size: 13px; color: #475569; background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 6px; padding: 8px 12px; margin-bottom: 8px; position: sticky; left: 0; }
.vc-sum .neg { color: #DC2626; }
.vc-table { border-collapse: separate; border-spacing: 0; font-size: 12px; white-space: nowrap; }
.vc-table th, .vc-table td { border-right: 1px solid #EEF2F7; border-bottom: 1px solid #EEF2F7; padding: 3px 8px; }
.vc-table td { max-width: 220px; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }  /* 超长不显示，单击看全文 */
.vc-table.vc-fixed td { max-width: none; }   /* 手动调列宽后由列宽+ellipsis 截断 */
.vc-table thead th { position: sticky; top: 0; background: #F1F5F9; font-weight: 700; color: #334155; z-index: 3; }
.vc-table thead th { cursor: pointer; user-select: none; }                 /* 单击标题排序 */
.vc-table thead th:hover { background: #E2E8F0; }
.vc-table .th-sort { margin-left: 4px; font-size: 10px; color: #2563EB; }  /* 排序指示 ▲▼ */
.vc-table .th-rz { position: absolute; right: -4px; top: 0; width: 8px; height: 100%; cursor: col-resize; z-index: 4; }  /* 列宽手柄 */
.vc-table .th-rz:hover { background: #93C5FD; }
.vc-table td.n { text-align: right; font-family: Consolas, monospace; }
.vc-table tbody tr:hover td { background: #FFFBEB; }

/* 弹窗拖动手柄（标题栏按住可拖动窗口） */
.drag-handle { cursor: move; user-select: none; }
.drag-handle .vc-close { cursor: pointer; }
.rpt-unit { font-size: 12px; color: #B45309; background: #FEF3C7; border-radius: 4px; padding: 2px 8px; }

/* 树形筛选（单框下拉树） */
.treepick { position: relative; display: inline-block; }
.tp-val { min-width: 220px; height: 32px; line-height: 30px; border: 1px solid #D1D5DB; border-radius: 6px; padding: 0 10px; font-size: 13px; background: #fff; cursor: pointer; user-select: none; }
.tp-val:hover { border-color: #2563EB; }
.tp-panel { position: absolute; top: 36px; left: 0; z-index: 50; width: 300px; background: #fff; border: 1px solid #CBD5E1; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.15); padding: 8px; }
.tp-search { width: 100%; height: 30px; border: 1px solid #D1D5DB; border-radius: 6px; padding: 0 8px; font-size: 12px; margin-bottom: 6px; }
.tp-tree { max-height: 380px; overflow: auto; font-size: 13px; }
.tp-node { padding: 3px 6px; border-radius: 5px; cursor: pointer; white-space: nowrap; display: flex; align-items: center; }
.tp-node:hover { background: #EFF6FF; }
.tp-node.sel { background: #DBEAFE; outline: 1px solid #93C5FD; }
.tp-tw { width: 16px; text-align: center; color: #94A3B8; flex: none; user-select: none; }
.tp-c { color: #64748B; font-size: 11px; font-family: Consolas, monospace; margin-right: 6px; }

/* ================= 权限系统 ================= */
/* 登录框注册入口 */
.login-link { text-align: center; font-size: 12px; color: #2563EB; cursor: pointer; margin-top: 12px; }
.login-link:hover { text-decoration: underline; }

/* 注册面板 */
.reg-box { width: 860px; max-width: 94vw; max-height: 92vh; overflow: auto; }
.reg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.reg-perm-title { font-size: 13px; color: #475569; margin: 6px 0 10px; }
.reg-perm-title select { height: 30px; border: 1px solid #D1D5DB; border-radius: 6px; padding: 0 8px; font-size: 13px; margin-left: 8px; }
.reg-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: stretch; }
.reg-col { border: 1px solid #E2E8F0; border-radius: 8px; padding: 10px; display: flex; flex-direction: column; }
.reg-col h3 { font-size: 13px; font-weight: 700; color: #475569; margin-bottom: 10px; flex: none; }
.reg-col-h { font-size: 12px; font-weight: 700; color: #475569; margin-bottom: 8px; }
.reg-col .list { height: 260px; overflow: auto; flex: 1; }
.reg-col .search { flex: none; }
/* 单位树展开箭头 */
.b-tw { display: inline-block; width: 16px; text-align: center; color: #94A3B8; cursor: pointer; user-select: none; flex: none; }
.b-tw:hover { color: #2563EB; }
.reg-mid { display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.reg-mid .btn { margin-right: 0; width: 100%; }
.reg-mid .hint-inline { text-align: center; }
.reg-btns { margin-top: 14px; display: flex; gap: 10px; }
.reg-btns .btn { flex: 1; margin-right: 0; height: 38px; }

/* 权限页 */
.pm-group { margin-bottom: 14px; }
.pm-gtitle { font-size: 13px; font-weight: 700; color: #1E3A5F; margin-bottom: 8px; }
.pm-chip { display: inline-block; background: #EFF6FF; border: 1px solid #BFDBFE; color: #1D4ED8; border-radius: 6px; padding: 4px 10px; font-size: 12px; margin: 0 8px 8px 0; }
.b-item .tag { display: inline-block; background: #F1F5F9; border-radius: 4px; font-size: 11px; color: #64748B; padding: 1px 6px; margin-right: 6px; }
.b-item .ind { color: #CBD5E1; font-family: monospace; white-space: pre; }

/* 管理表格 */
.adm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.adm-table th, .adm-table td { border: 1px solid #EEF2F7; padding: 6px 10px; text-align: left; }
.adm-table thead th { background: #F1F5F9; color: #334155; }
.adm-table tbody tr:hover td { background: #F8FAFC; }
.btn-s { padding: 3px 10px; font-size: 12px; margin-right: 6px; }

/* 状态标签 */
.st { display: inline-block; border-radius: 4px; padding: 2px 8px; font-size: 12px; }
.st-g { background: #DCFCE7; color: #15803D; }
.st-p { background: #FEF3C7; color: #B45309; }
.st-r { background: #FEE2E2; color: #DC2626; }

/* A002 单位树：无权限的祖先节点 */
.tp-node.tp-off { color: #B6C2D2; cursor: default; }
.tp-node.tp-off:hover { background: none; }
.tp-node.tp-off .tp-c { color: #CBD5E1; }

/* A007 单位树：所选月份无库存数据的节点 */
.tp-node.tp-nodata { color: #C3CEDB; cursor: default; }
.tp-node.tp-nodata:hover { background: none; }
.tp-node.tp-nodata .tp-c { color: #D4DEE9; }
.tp-node .tp-nd { color: #D4DEE9; font-size: 11px; }

/* ================= 注释功能演示 ================= */
/* 单元格右上角红色标识 */
td.ann-mark { position: relative; }
td.ann-mark::after { content: ""; position: absolute; top: 0; right: 0; width: 0; height: 0; border-top: 7px solid #DC2626; border-left: 7px solid transparent; }

/* 气泡弹层内的注释区 */
.ann-pop { border-top: 1px dashed #E2E8F0; margin-top: 8px; padding-top: 8px; }
.ann-pop-h { font-size: 12px; font-weight: 700; color: #B45309; margin-bottom: 4px; }
.ann-pop-h .ann-h-btns { font-weight: 400; }
.ann-pop-h .ann-h-btns .btn { margin-left: 8px; vertical-align: 1px; }
.ann-pop-preview { font-size: 12px; color: #475569; margin-bottom: 6px; line-height: 1.5; }
.ann-pop-btns .btn { margin-right: 8px; }
.ann-mk-cur { font-size: 12px; color: #475569; margin-top: 4px; }
.ann-mk-cur .btn { margin-left: 10px; }

/* 注释对话框 */
.ann-mask { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 97; display: flex; align-items: center; justify-content: center; }
.ann-panel { background: #fff; width: 720px; max-width: 94vw; max-height: 88vh; overflow: auto; border-radius: 12px; box-shadow: 0 16px 48px rgba(0,0,0,.3); }
.ann-head { padding: 12px 18px; background: #1E3A5F; color: #fff; font-size: 14px; font-weight: 700; }
.ann-head .vc-close { float: right; cursor: pointer; color: #B8C7DA; padding: 0 6px; }
.ann-head .vc-close:hover { color: #fff; }
.ann-sub { padding: 8px 18px; font-size: 12px; color: #64748B; background: #F8FAFC; border-bottom: 1px solid #EEF2F7; }
.ann-list { max-height: 300px; overflow: auto; padding: 10px 18px; }
/* 下级项目注释区（明细行注释对话框内，与本行注释用分隔线隔开） */
.ann-sub-wrap { border-top: 2px solid #CBD5E1; }
.ann-sub-sep { padding: 8px 18px 4px; font-size: 13px; font-weight: 700; color: #1E3A5F; }
.ann-sub-list { max-height: 250px; overflow: hidden; padding: 2px 18px 6px; }
.ann-sub-list.expanded { max-height: 46vh; overflow: auto; }
.ann-sub-item { margin-bottom: 9px; }
.ann-sub-loc { font-size: 12px; font-weight: 600; color: #2563EB; }
.ann-sub-loc .ann-sub-att { margin-left: 10px; }
.ann-sub-txt { font-size: 13px; color: #334155; line-height: 1.65; white-space: pre-line; word-break: break-word; padding-left: 12px; border-left: 3px solid #BFDBFE; margin-top: 2px; }
.ann-sub-more { padding: 0 18px 8px; }
/* 上传图片窗口 */
.ann-up-panel { width: 560px; outline: none; }
.ann-up-tip { padding: 8px 18px; font-size: 12px; color: #64748B; background: #F8FAFC; border-bottom: 1px solid #EEF2F7; }
.ann-up-list { padding: 12px 18px; max-height: 50vh; overflow: auto; display: flex; flex-wrap: wrap; gap: 10px; }
.ann-up-item { position: relative; border: 1px solid #E2E8F0; border-radius: 8px; padding: 6px; text-align: center; }
.ann-up-item img { max-width: 150px; max-height: 110px; display: block; margin-bottom: 6px; cursor: zoom-in; }
.ann-paste-tip { font-size: 12px; color: #DC2626; margin-left: 8px; }
/* 附件查看器 */
.ann-att-panel { width: 760px; }
.ann-att-body { padding: 12px 18px; max-height: 70vh; overflow: auto; }
.ann-att-body img { max-width: 100%; }
/* 图片查看器（注释图片单击放大） */
.imgview-mask { position: fixed; inset: 0; background: rgba(0,0,0,.82); z-index: 120; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.imgview-img { max-width: 92vw; max-height: 88vh; cursor: grab; user-select: none; -webkit-user-drag: none; box-shadow: 0 8px 40px rgba(0,0,0,.5); }
.imgview-close { position: fixed; top: 14px; right: 22px; color: #CBD5E1; font-size: 22px; cursor: pointer; z-index: 121; }
.imgview-close:hover { color: #fff; }
.imgview-tip { position: fixed; bottom: 12px; left: 50%; transform: translateX(-50%); color: #94A3B8; font-size: 12px; pointer-events: none; }
.ann-item-c img, .ann-att-body img, .ann-bar img { cursor: zoom-in; }
.ann-empty { color: #94A3B8; font-size: 13px; padding: 12px 0; }
.ann-item { margin-bottom: 10px; }
.ann-item-h { font-size: 13px; color: #1F2937; margin-bottom: 4px; }
.ann-item-h .ann-del { float: right; }
.ann-item-c { font-size: 13px; color: #475569; line-height: 1.7; padding-left: 12px; border-left: 3px solid #FDE68A; }
.ann-item-c img, .ann-img { max-width: 100%; max-height: 240px; border: 1px solid #E2E8F0; border-radius: 6px; margin: 6px 0; }
.ann-tbl { border-collapse: collapse; margin: 6px 0; font-size: 12px; }
.ann-tbl td { border: 1px solid #CBD5E1; padding: 4px 10px; min-width: 60px; }
.ann-tbl tr:first-child td { background: #F1F5F9; font-weight: 700; }
.ann-editor-h { padding: 8px 18px 4px; font-size: 12px; color: #64748B; }
.ann-editor { margin: 0 18px; min-height: 90px; max-height: 220px; overflow: auto; border: 1px solid #D1D5DB; border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.ann-editor:focus { outline: 2px solid #BFDBFE; }
.ann-toolbar { padding: 8px 18px; }
.ann-foot { padding: 0 18px 16px; }

/* 报表级注释横条（报表下方） */
#annBar { background: #FFFBEB; border: 1px solid #FDE68A; border-radius: 10px; padding: 12px 16px; margin-top: 12px; }
.ann-bar-h { font-size: 13px; font-weight: 700; color: #B45309; margin-bottom: 8px; }
.ann-bar-h .btn { margin-left: 12px; }
.ann-month { font-size: 12px; font-weight: 700; color: #92400E; margin: 8px 0 4px; }

/* ================= 注释正式版补充 ================= */
.ann-pop-line { font-size: 12px; color: #475569; line-height: 1.6; margin-bottom: 4px; white-space: pre-line; }
.ann-pop-line b { color: #1F2937; }
.ann-attach { display: inline-block; background: #FEF3C7; color: #B45309; border-radius: 4px; font-size: 11px; padding: 0 5px; margin-left: 4px; }
.ann-edited { font-size: 11px; color: #94A3B8; }
.ann-item-ops { float: right; }

/* 格式标注按钮 */
.mk-btn-risk { background: #FEF08A; color: #854D0E; }
.mk-btn-abn { background: #FECACA; color: #991B1B; }

/* 单元格格式标注：底色 + 值前符号；标注格内红字转黑 */
td.mk-risk { background: rgb(255,255,0) !important; }
td.mk-abn { background: #FECACA !important; }
td.mk-risk .neg, td.mk-abn .neg { color: #1F2937 !important; }
.mk-ico { margin-right: 2px; font-size: 11px; }

/* ================= A002 表头新控件（多选/口径/操作按钮） ================= */
.rpt-filter input[type="checkbox"] { width: auto; height: auto; background: none; border: none; padding: 0; }
.rpt-multi { cursor: pointer; user-select: none; }
.rpt-acts { margin-left: auto; display: flex; gap: 8px; }
.tp-foot { display: flex; align-items: center; gap: 8px; border-top: 1px solid #E2E8F0; margin-top: 6px; padding-top: 8px; }
.tp-ck { margin: 0 4px 0 0; vertical-align: -2px; cursor: pointer; }
.tp-ck-off { display: inline-block; width: 17px; }   /* 无权限节点占位，保持对齐 */
.ann-multi-hint { color: #94A3B8 !important; font-weight: 400 !important; }

/* ================= 打印样式：只输出 A002 报表区 ================= */
@media print {
  .sidebar, .sb-quit, #annBar, .rpt-acts, .rpt-filter, .drill-pop, .dm-mask, .vc-mask, .cd-mask, .ann-mask { display: none !important; }
  #shell { display: block !important; }
  .content { overflow: visible !important; }
  .page { display: none !important; }
  .page.active { display: block !important; }
  .rpt-head { border: none; padding: 0 0 8px 0; margin-bottom: 8px; }
  .rpt-wrap { overflow: visible !important; height: auto !important; border: none; }
  .rpt { font-size: 8pt; }
  .rpt th, .rpt td { padding: 2px 4px; }
  body { background: #fff; }
  tr.key-row td { background: #E8F5E9 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  td.total, th.total { background: #F1F5F9 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  td.mk-risk { background: rgb(255,255,0) !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  td.mk-abn { background: #FECACA !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .neg { color: #DC2626 !important; }
}

/* ================= 凭证明细筛选栏 ================= */
.vc-filter { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 14px; background: #F8FAFC; border-bottom: 1px solid #E2E8F0; font-size: 12px; color: #64748B; }
.vc-filter label { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.vc-filter input { height: 26px; border: 1px solid #D1D5DB; border-radius: 5px; padding: 0 6px; font-size: 12px; width: 110px; }
.vc-filter input.vf-num { width: 42px; text-align: center; }
.vc-filter input.vf-amt { width: 90px; }
.vc-filter select { height: 26px; border: 1px solid #D1D5DB; border-radius: 5px; font-size: 12px; }

/* 凭证汇总表：行可单击 */
.vcs-table tbody tr { cursor: pointer; }
.vcs-table tbody tr:hover td { background: #EFF6FF; }

/* ================= A003 单月版：分区边框 ================= */
/* 金额区/占比区整体粗边框（sec-l 左 / sec-r 右 / sec-t 顶 / sec-b 底）；区内口径间细线 sec-m */
.rpt-a003 th.sec-l, .rpt-a003 td.sec-l { border-left: 2px solid #334155 !important; }
.rpt-a003 th.sec-r, .rpt-a003 td.sec-r { border-right: 2px solid #334155 !important; }
.rpt-a003 th.sec-t { border-top: 2px solid #334155 !important; }
.rpt-a003 td.sec-b { border-bottom: 2px solid #334155 !important; }
.rpt-a003 th.sec-m, .rpt-a003 td.sec-m { border-left: 1px solid #94A3B8 !important; }
/* A004 同规则：两区粗边框 + 区内每 3 单位细线（sec-m） */
.rpt-a004 th.sec-l, .rpt-a004 td.sec-l { border-left: 2px solid #334155 !important; }
.rpt-a004 th.sec-r, .rpt-a004 td.sec-r { border-right: 2px solid #334155 !important; }
.rpt-a004 th.sec-t { border-top: 2px solid #334155 !important; }
.rpt-a004 td.sec-b { border-bottom: 2px solid #334155 !important; }
.rpt-a004 th.sec-m, .rpt-a004 td.sec-m { border-left: 1px solid #94A3B8 !important; }
/* 报表注释横条（A002/A003 页面各一条，用 class 命中） */
.ann-bar { background: #FFFBEB; border: 1px solid #FDE68A; border-radius: 10px; padding: 12px 16px; margin-top: 12px; }
@media print { .ann-bar { display: none !important; } }

/* A003 对比口径多选面板 */
.tp-cmp-list{display:flex;flex-direction:column;padding:4px 0;min-width:150px;}
.tp-cmp-item{display:flex;align-items:center;gap:6px;padding:5px 12px;font-size:12px;cursor:pointer;white-space:nowrap;color:#1F2937;}
.tp-cmp-item:hover{background:#F1F5F9;}
.tp-cmp-item input{margin:0;cursor:pointer;}

/* A004 树形筛选：搜索框 + 清空按钮 同行 */
.tp-top{display:flex;gap:4px;align-items:center;}
.tp-top .tp-search{flex:1;min-width:0;}
.tp-top .btn{flex-shrink:0;}

/* B001 凭证明细查询（财务查询） */
.b001-filter { margin: 0 0 10px; border: 1px solid #E2E8F0; border-radius: 10px; }
.b001-filter .treepick { display: inline-block; position: relative; }
.b001-filter .treepick .tp-val { height: 26px; line-height: 24px; min-width: 90px; }
.b001-filter .tp-panel { position: absolute; top: 30px; left: 0; z-index: 60; background: #fff; border: 1px solid #D1D5DB; border-radius: 8px; box-shadow: 0 6px 18px rgba(15,23,42,.12); padding: 8px; max-height: 260px; overflow: auto; }
.b001-filter .tp-cmp-item { display: flex; align-items: center; gap: 6px; padding: 4px 8px; font-size: 12px; color: #334155; cursor: pointer; white-space: nowrap; }
.b001-filter .tp-cmp-item:hover { background: #F1F5F9; border-radius: 4px; }

/* A005 集团及各渠道经营诊断矩阵图 */
.a005 th, .a005 td { padding: 6px 8px; vertical-align: middle; }   /* 行高≈1.2倍（25px→29px），字体垂直居中；表头行高由 height 固定不受影响 */
.a005 thead th { color: #334155 !important; background-clip: padding-box;     /* 表头三行字色统一；背景填满边框位防闪缝 */
  border-bottom: 1px solid #94A3B8 !important; border-right-color: #CBD5E1 !important; }
.a005 thead tr:nth-child(2) th { font-weight: 700; top: 30px; }                  /* 吸顶微叠1px，盖住行1下缘缝 */
.a005 thead tr:nth-child(3) th { top: 56px; height: 24px; font-weight: 400; }  /* 吸顶微叠1px+不透明底色，杜绝滚动闪缝 */
.a005 thead th.hb0 { background: #E8EDF3 !important; }                 /* 基本信息块底色 */
.a005 thead th.hb1 { background: #DBEAFE !important; }                 /* 本月块底色 */
.a005 thead th.hb2 { background: #E7F6EC !important; }                 /* 本年合计块底色 */
.a005 th.bb-l, .a005 td.bb-l { border-left: 2px solid #334155 !important; }   /* 块左粗框 */
.a005 th.bb-r, .a005 td.bb-r { border-right: 2px solid #334155 !important; }  /* 表右粗框 */
.a005 th.bg-l, .a005 td.bg-l { border-left: 1px solid #94A3B8 !important; }   /* 组间细框 */
.a005 thead tr:first-child th { border-top: 2px solid #334155; }
.a005 tbody tr:last-child td { border-bottom: 2px solid #334155; }
.a005 td.n { text-align: right; font-family: Consolas, "Microsoft YaHei", monospace; }
.a005 td.c { text-align: center; }
.a005 td.nm { text-align: left; }
.a005 td.rc { background: #EFF6FF; }                                   /* 率/达成率列底色 */
.a005 td .neg, .a005 td.neg { color: #DC2626; }
.a005 td.ins { text-align: center; color: #CBD5E1; min-width: 140px; } /* 关键洞察占位（三期开放），列宽×2 */
.a005 td.tw5c { width: 22px; min-width: 22px; text-align: center; padding: 4px 2px !important; }
.a005 .tw5 { display: inline-block; width: 14px; height: 14px; line-height: 12px; border: 1px solid #94A3B8;
  border-radius: 3px; font-size: 11px; color: #334155; cursor: pointer; user-select: none; background: #F8FAFC; }
.a005 .tw5:hover { background: #DBEAFE; border-color: #64748B; }
.a005 th.tw5h { min-width: 22px; }
/* 行下边框：L1/L2 有可见下级粗线；L3~L5 有可见下级各级颜色细线 */
.a005 td.rb2 { border-bottom: 2px solid #334155 !important; }
.a005 td.rb3 { border-bottom: 1px solid #64748B !important; }          /* 3级 灰蓝 */
.a005 td.rb4 { border-bottom: 1px solid #3B82F6 !important; }          /* 4级 蓝 */
.a005 td.rb5 { border-bottom: 1px solid #D97706 !important; }          /* 5级 橙 */

/* A005 行上边框（与下边框同规则对称）：子树结束的下一行按本行级加线 */
.a005 td.rt2 { border-top: 2px solid #334155 !important; }
.a005 td.rt3 { border-top: 1px solid #64748B !important; }
.a005 td.rt4 { border-top: 1px solid #3B82F6 !important; }
.a005 td.rt5 { border-top: 1px solid #D97706 !important; }
/* A005 层级按钮条（Excel 分组同款） */
.lv-bar { display: inline-flex; gap: 3px; margin-left: 6px; vertical-align: middle; }
.lv-b { min-width: 22px; height: 22px; padding: 0 6px; border: 1px solid #CBD5E1; border-radius: 4px;
  background: #fff; color: #334155; font-size: 11px; cursor: pointer; line-height: 20px; }
.lv-b:hover { background: #EFF6FF; }
.lv-b.act { background: #1E3A5F; color: #fff; border-color: #1E3A5F; }

/* A005 冻结列：展开列 + 单位编码 + 单位名称（横向滚动时固定，偏移由 JS 实测写入 --l2/--l3） */
.a005 .c-tg   { position: sticky; left: 0; z-index: 4; background: #fff; }
.a005 .c-code { position: sticky; left: var(--l2, 26px); z-index: 4; background: #fff; }
.a005 .c-name { position: sticky; left: var(--l3, 120px); z-index: 4; background: #fff;
  border-right: 2px solid #94A3B8 !important; }                       /* 冻结区右缘分隔线 */
.a005 thead .c-tg, .a005 thead .c-code, .a005 thead .c-name { z-index: 9; }   /* 表头冻结列压在数据冻结列之上 */

/* A005 二期：单元格操作弹层 + 趋势图弹窗 */
.a005 td.lk { cursor: pointer; }
.a005 td.lk:hover { outline: 2px solid #F59E0B; outline-offset: -2px; }
.a005-pop { position: fixed; z-index: 96; background: #fff; border: 1px solid #CBD5E1; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.15); padding: 10px 12px; }
.a005-pop .ap-title { font-size: 12px; font-weight: 700; color: #1E3A5F; margin-bottom: 8px; white-space: nowrap; }
.a005-pop .ap-btns { display: flex; gap: 8px; }
.a005-trend-panel { width: 880px; max-width: 94vw; }
.a005-trend-body { height: 430px; padding: 6px 10px 10px; }

/* ================= 三期：私密注释 + A005 关键洞察列 ================= */
.ann-priv { color: #DC2626; font-size: 11px; font-weight: 700; margin-right: 2px; }
.ann-priv-ck { margin-left: 14px; font-size: 12px; color: #475569; cursor: pointer; user-select: none; }
.ann-priv-ck input { vertical-align: -2px; margin-right: 3px; }
.a005 td.ins { text-align: left; color: #334155; min-width: 220px; max-width: 260px; font-size: 12px; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }   /* 内容不溢出单元格 */
.a005 td.ins:hover { outline: 2px solid #F59E0B; outline-offset: -2px; }
.a005 td.ins .ins-add { color: #CBD5E1; font-weight: 700; }
.a005 td.ins .ins-cnt { margin-left: 6px; color: #fff; background: #94A3B8; border-radius: 8px; padding: 0 6px; font-size: 10px; }
.a005 td.ins .ann-attach { color: #2563EB; font-size: 11px; margin-left: 2px; }

/* ================= A006 资产负债表（管理用格式）：左右双栏 ================= */
.a006 { border-collapse: separate; border-spacing: 0; width: auto; max-width: 100%; table-layout: auto; }
.a006 th, .a006 td { border-right: 1px solid #E2E8F0; border-bottom: 1px solid #E2E8F0; padding: 4px 8px; font-size: 13px; white-space: nowrap; }
.a006 th.bs-hd { background: #A6A6A6; color: #fff; font-weight: 700; position: sticky; z-index: 3; }
.a006 thead tr:first-child th { top: 0; }
.a006 thead tr:nth-child(2) th { top: 27px; }
.a006 th.bs-side { font-size: 14px; letter-spacing: 6px; }
.a006 .bs-gap { width: 14px; background: #F1F5F9; border: none; padding: 0; }
.a006 td.bs-rn { width: 40px; text-align: center; color: #64748B; font-size: 12px; }
.a006 td.bs-nm, .a006 th.bs-nm { min-width: 210px; text-align: left; }
.a006 td.bs-amt, .a006 th.bs-amt { text-align: right; min-width: 105px; }
/* 行底色（取自需求 Excel theme 色） */
.a006 td.bs-sec { background: #D9D9D9; font-weight: 700; }          /* 分组标题行 */
.a006 td.bs-sub { background: #C8E5B3; font-weight: 700; }          /* 合计行 */
.a006 td.bs-net1 { background: #ACE6E1; font-weight: 700; }         /* 净经营性流动/净负债、总计 */
.a006 td.bs-net2 { background: #FADBDF; font-weight: 700; }         /* 净长期资产/股东权益合计 */
/* 可点击金额单元格 */
.a006 td.a6 { cursor: pointer; }
.a006 td.a6:hover { outline: 2px solid #F59E0B; outline-offset: -2px; }
.a006 td .neg, .a006 td.neg { color: #DC2626; }
/* 平衡校验行 */
.bs-check { margin-top: 6px; font-size: 12px; padding: 4px 10px; display: inline-block; border-radius: 6px; }
.bs-check.ok { color: #15803D; background: #F0FDF4; }
.bs-check.bad { color: #B91C1C; background: #FEF2F2; font-weight: 700; }
/* 弹层/弹窗 */
.a006-pop { z-index: 96; min-width: 380px; max-width: 560px; }
.a006-pop .dp-title { cursor: move; }
.a006-pop .ap-btns { margin-top: 8px; }
.a006-pop .ap-btns .btn { margin-right: 8px; }
.a006-drill-panel { width: 900px; max-width: 95vw; height: auto; max-height: 88vh; }
.a006-drill-body { padding: 14px 18px; overflow: auto; flex: 1; }
.a006-drill-body .a006 th.bs-hd { position: static; }
.a6-crumb-lk { cursor: pointer; color: #FDBA74; }
.a6-crumb-lk:hover { color: #fff; text-decoration: underline; }

/* ================= 用户管理：待审批列表（一人一行） + 审批栏 ================= */
#pendingPermCard { overflow-x: auto; }
#pendingPermTbl { table-layout: fixed; width: 100%; }
#pendingPermTbl .pp-c0 { width: 4ch; }    /* 选择：2中文字符=4字节 */
#pendingPermTbl .pp-c1 { width: 12ch; }   /* 用户：6中文字符=12字节 */
#pendingPermTbl .pp-c2 { width: 40ch; }   /* 报表类型：20中文字符=40字节，可换行 */
#pendingPermTbl .pp-c3 { width: 100ch; }  /* 申请单位：50中文字符=100字节，自动换行 */
#pendingPermTbl .pp-c4 { width: 20ch; }   /* 申请时间：20字节 */
#pendingPermTbl td.pp-wrap { white-space: normal; word-break: break-all; line-height: 1.5; }
#pendingPermTbl .pp-row { cursor: pointer; }
#pendingPermTbl .pp-row:hover td { background: #F0F7FF; }
.gr-review-bar { display: flex; align-items: center; gap: 10px; margin: 4px 0 12px;
  padding: 10px 14px; background: #FFFBEB; border: 1px solid #FCD34D; border-radius: 8px; font-size: 13px; }
.gr-review-bar b { color: #B45309; }

/* ================= A005 趋势图：上方本年累计数字卡片 ================= */
.a005-trend-cards { display: flex; gap: 12px; padding: 10px 16px 0; flex-wrap: wrap; }
.a005-trend-cards .tr-card { flex: 1; min-width: 130px; background: #F8FAFC; border: 1px solid #E2E8F0;
  border-radius: 8px; padding: 8px 12px; text-align: center; }
.a005-trend-cards .tr-lb { font-size: 11px; color: #64748B; margin-bottom: 3px; }
.a005-trend-cards .tr-vl { font-size: 18px; font-weight: 700; color: #1E3A5F;
  font-family: Consolas, "Microsoft YaHei", monospace; }
.a005-trend-cards .tr-card.pos .tr-vl { color: #16A34A; }
.a005-trend-cards .tr-card.neg .tr-vl { color: #DC2626; }

/* ================= 用户管理：弹窗化（修改用户 / 授权管理 / 审批） ================= */
.pm-mask { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 80;
  display: flex; align-items: center; justify-content: center; }
.pm-mask .pm-modal { width: min(96vw, 1080px); max-height: 90vh; overflow: auto;
  box-shadow: 0 16px 48px rgba(0,0,0,.3); }
.pm-mask .pm-nopend { width: 320px; text-align: center; padding: 26px 20px; }

/* ================= A006 资产负债表：列宽 / 下钻符号 / 趋势卡片小字 ================= */
.a006 td.bs-code, .a006 th.bs-code { width: 15ch; min-width: 15ch; max-width: 15ch; overflow: hidden; text-overflow: ellipsis; }
.a006 td.bs-nm, .a006 th.bs-nm { width: 20em; min-width: 20em; max-width: 20em; overflow: hidden; text-overflow: ellipsis; }
.a006 td.bs-amt, .a006 th.bs-amt { width: 15ch; min-width: 15ch; }
.a006 .a6-kids { color: #2563EB; font-size: 11px; margin-left: 3px; }
.a005-trend-cards .tr-u { font-size: 11px; font-weight: 400; color: #64748B; margin-left: 2px; }
.a005-trend-cards .tr-sub { font-size: 11px; color: #64748B; margin-top: 2px; min-height: 14px; }
.a005-trend-cards .tr-sub2 { font-size: 9px; }   /* "（收入计算）"字体小两号 */

/* ================= A006 科目明细弹窗 ================= */
.a6-sb-panel { width: min(92vw, 560px); }
.a6-sb-body { padding: 10px 16px 16px; max-height: 70vh; overflow: auto; }
.a6-sb-tbl { width: 100%; }
.a6-sb-tbl td.a6-sb { cursor: pointer; }
.a6-sb-tbl td.a6-sb:hover { outline: 2px solid #F59E0B; outline-offset: -2px; }
.a6-sb-tbl tr.a6-sb-total td { background: #C8E5B3; font-weight: 700; }   /* 合计行浅绿 */

.a6-sd-panel { width: fit-content; max-width: 96vw; min-width: min(92vw, 900px); }
.a6-sd-filter { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center;
  padding: 8px 16px; font-size: 12px; color: #475569; border-bottom: 1px solid #E2E8F0; }
.a6-sd-filter .search { width: 120px; padding: 3px 6px; font-size: 12px; }
.a6-sd-filter .a6-amt-in { width: 80px; }
.a6-sd-filter select { font-size: 12px; padding: 2px 4px; }
.a6-sd-body { padding: 6px 16px 16px; max-height: 66vh; overflow: auto; }
.a6-sd-tbl { width: auto; }
.a6-sd-tbl th { cursor: pointer; }
/* 预设列宽（按字段最大字符数限定上限，超长省略） */
.a6-sd-tbl col.sb-book { width: 14em; }
.a6-sd-tbl col.sb-code { width: 11em; }
.a6-sd-tbl col.sb-name { width: 24em; }
.a6-sd-tbl col.sb-dim { width: 8em; }
.a6-sd-tbl col.sb-dimname { width: 16em; }
.a6-sd-tbl td { overflow: hidden; text-overflow: ellipsis; max-width: 24em; }
.a6-sd-tbl tbody tr:hover td { background: #FEF3C7; }

/* ================= BS-PL单位映射维护 ================= */
.bm-tbl { width: auto; border-collapse: collapse; font-size: 13px; }
.bm-tbl th, .bm-tbl td { border: 1px solid #E2E8F0; padding: 5px 9px; text-align: left; white-space: nowrap; }
.bm-tbl thead th { background: #1E3A5F; color: #fff; font-weight: 700; }
.bm-tbl td:nth-child(1) { max-width: 130px; }
.bm-tbl td:nth-child(2) { max-width: 160px; }
.bm-tbl td:nth-child(3) { max-width: 460px; white-space: normal; word-break: break-all; }
.bm-sec { font-weight: 700; color: #1E3A5F; margin: 8px 0 6px; font-size: 13px; }
.bm-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.bm-tag { background: #EFF6FF; border: 1px solid #BFDBFE; color: #1E40AF; border-radius: 4px;
  padding: 2px 8px; font-size: 12px; }
.bm-tag-x { color: #DC2626; cursor: pointer; margin-left: 6px; }
.bm-pick { display: block; padding: 3px 6px; font-size: 13px; cursor: pointer; }
.bm-pick:hover { background: #F1F5F9; }
.bm-pick-lb { cursor: pointer; }
.bm-sug { background: #FFF7ED; border-color: #FED7AA; color: #9A3412; }
.bm-star { color: #F59E0B; margin-right: 4px; }
.bm-none { background: #F1F5F9; border-color: #CBD5E1; color: #64748B; }
.bm-dis { color: #9CA3AF; }
.bm-dis .bm-pick-lb { cursor: not-allowed; }
.bm-usedby { font-size: 11px; color: #B45309; margin-left: 6px; }
.bm-miss { font-size: 11px; color: #B45309; margin-top: 2px; }

/* ================= A007 库存分析 ================= */
.a007-vtabs .btn { margin-right: 4px; }
.a7-sec { max-width: 1400px; margin: 0 auto; position: sticky; top: 0; z-index: 20; background: #fff; padding: 4px 0 6px; box-shadow: 0 4px 8px -6px rgba(15,23,42,.25); }
.a7-cards { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 4px; }
.a7-card { background: linear-gradient(150deg, #1E293B, #0F172A); border: 1px solid #334155; border-radius: 10px; padding: 10px 14px; flex: 1 1 180px; min-width: 180px; max-width: 280px; box-shadow: 0 2px 6px rgba(15,23,42,.35); }
.a7-card .t { font-size: 12px; color: #94A3B8; }
.a7-card .v { font-size: 22px; font-weight: 700; color: #F8FAFC; margin: 3px 0; }
.a7-card .s { font-size: 11px; color: #7C8DA6; }
.a7-card .s .neg { color: #F87171; }
.a7-more-toggle { text-align: center; margin: 2px 0 10px; }
.a7-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 1400px; margin: 0 auto; padding-bottom: 20px; }
.a7-panel { background: #fff; border: 1px solid #E2E8F0; border-radius: 10px; padding: 10px 12px; min-width: 0; }
.a7-panel h3 { font-size: 13px; margin: 0 0 6px; color: #334155; font-weight: 600; }
.a7-span2 { grid-column: span 2; }
.a7-chart { height: 300px; }
.a7-bar { background: #EFF6FF; border-radius: 3px; height: 12px; min-width: 80px; overflow: hidden; }
.a7-bar i { display: block; background: #3B82F6; height: 12px; border-radius: 3px; }
.a7-tbl { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 6px; }
.a7-tbl th, .a7-tbl td { border: 1px solid #E2E8F0; padding: 4px 8px; text-align: right; white-space: nowrap; }
.a7-tbl th { background: #F1F5F9; text-align: center; font-weight: 600; color: #475569; }
.a7-tbl td.l, .a7-tbl th.l { text-align: left; }
.a7-cross td { min-width: 90px; }
@media (max-width: 1100px) {
  .a7-grid { grid-template-columns: 1fr; }
  .a7-span2 { grid-column: span 1; }
}

/* A007 补充：卡片居中 + 分组标题 */
.a7-card { text-align: center; }
.a7-sub { font-size: 12px; color: #64748B; font-weight: 600; margin: 8px 0 0; max-width: 1400px; }

/* A007 图表气泡弹层 */
.a007-pop { min-width: 240px; }
.a007-pop .a007-pop-x { float: right; cursor: pointer; color: #94A3B8; font-size: 16px; line-height: 1; margin-left: 12px; }
.a007-pop .a007-pop-x:hover { color: #DC2626; }
.a7-tbl td.a7-num { cursor: pointer; }
.a7-tbl td.a7-num:hover { outline: 2px solid #2563EB; outline-offset: -2px; }

/* ===== 开发环境标识（仅 ENABLE_MAINT=1 环境由 JS 加 .dev-env） ===== */
body.dev-env::after{content:"";position:fixed;inset:0;pointer-events:none;z-index:9990;opacity:.07;
  background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="260" height="260"><text x="130" y="130" font-size="30" fill="%23b91c1c" font-weight="bold" text-anchor="middle" transform="rotate(-30 130 130)">开发环境</text></svg>');}
.dev-badge{display:inline-block;margin-left:6px;padding:1px 6px;background:#b91c1c;color:#fff;font-size:11px;border-radius:4px;vertical-align:middle;font-style:normal;}

/* ===== 数据同步页 ===== */
.sync-row{display:flex;align-items:center;gap:14px;margin:14px 0;}
.sync-row .btn{font-size:15px;padding:10px 22px;min-width:430px;text-align:left;}
.sync-note{color:#64748B;font-size:13px;}
.sync-log{background:#0F172A;color:#A5F3FC;font-family:Consolas,monospace;font-size:13px;
  padding:12px 14px;border-radius:6px;min-height:120px;max-height:320px;overflow:auto;white-space:pre-wrap;margin-top:8px;}
#pageSync table{border-collapse:collapse;width:100%;font-size:13px;}
#pageSync th,#pageSync td{border:1px solid #E2E8F0;padding:5px 10px;text-align:left;}
#pageSync th{background:#F1F5F9;}
#pageSync td.r{text-align:right;}
