* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif; font-size: 13px; color: #1f2933; background: #f4f6f8; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; background: #1e3a5f; color: #fff; }
.brand { font-weight: 700; font-size: 15px; }
.brand .sub { font-weight: 400; font-size: 12px; opacity: .8; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.save-state { font-size: 11px; opacity: .7; }

.layout { display: flex; height: calc(100vh - 46px); }
.sidebar { width: 320px; background: #fff; border-right: 1px solid #e3e8ee; overflow-y: auto; padding: 12px; }
.workspace { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

h3 { font-size: 13px; margin-bottom: 8px; color: #1e3a5f; }
.master, .doclist { margin-bottom: 18px; }
.tabs { display: flex; gap: 4px; margin-bottom: 8px; }
.tab { flex: 1; padding: 6px 4px; border: 1px solid #d6dee7; background: #f7f9fb; border-radius: 4px; cursor: pointer; font-size: 12px; }
.tab.active { background: #1e3a5f; color: #fff; border-color: #1e3a5f; }
.master-form { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.master-form .full { grid-column: 1 / -1; }
.master-actions { display: flex; gap: 6px; margin-top: 8px; }

.field { display: flex; flex-direction: column; gap: 2px; }
.field label { font-size: 11px; color: #62707d; }
.field input, .field select, .field textarea {
  border: 1px solid #d6dee7; border-radius: 4px; padding: 5px 6px; font-size: 12px; width: 100%; background: #fff;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }

.doc-list { display: flex; flex-direction: column; gap: 4px; }
.doc-item { padding: 7px 9px; border: 1px solid #e3e8ee; border-radius: 4px; cursor: pointer; background: #fbfcfe; font-size: 12px; }
.doc-item:hover { border-color: #1e3a5f; }
.doc-item.active { background: #e8f0fa; border-color: #1e3a5f; font-weight: 600; }
.doc-item .grp { font-size: 10px; color: #9aa6b2; margin-left: 6px; }

.ws-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #fff; border-bottom: 1px solid #e3e8ee; }
.doc-select { flex: 1; max-width: 360px; padding: 6px; border: 1px solid #d6dee7; border-radius: 4px; }
.ws-bar-actions { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }

.btn { border: 1px solid #1e3a5f; background: #1e3a5f; color: #fff; padding: 6px 12px; border-radius: 4px; cursor: pointer; font-size: 12px; }
.btn:hover { opacity: .9; }
.btn.small { padding: 5px 9px; font-size: 11px; }
/* 前置条件未满足：仍可点击（点击会给出明确指引），仅做视觉弱化 */
.btn.dim { opacity: .55; }
.btn.dim:hover { opacity: .85; }
.btn.ghost { background: #fff; color: #1e3a5f; }
.btn.primary { background: #2e7d32; border-color: #2e7d32; }

.ws-body { flex: 1; display: flex; overflow: hidden; }
.form-pane { width: 48%; overflow-y: auto; padding: 12px; border-right: 1px solid #e3e8ee; }
.preview-pane { flex: 1; overflow-y: auto; padding: 16px; background: #e9edf1; }
.preview.a4 { background: #fff; width: 100%; max-width: 820px; margin: 0 auto; padding: 28px 32px; box-shadow: 0 1px 6px rgba(0,0,0,.12); min-height: 1000px; }

.doc-form section { margin-bottom: 14px; border: 1px solid #eef1f4; border-radius: 6px; padding: 10px; background: #fbfcfe; }
.doc-form section > h4 { font-size: 12px; color: #1e3a5f; margin-bottom: 8px; border-bottom: 1px dashed #d6dee7; padding-bottom: 4px; }
.items-table { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 11px; }
.items-table th, .items-table td { border: 1px solid #d6dee7; padding: 3px 4px; }
.items-table input { width: 100%; border: none; font-size: 11px; padding: 2px; }
.items-table th { background: #f0f4f8; }
.add-row { margin-top: 6px; }

.preview h1, .preview h2 { text-align: center; }
.preview .doc-title { font-size: 18px; font-weight: 700; text-align: center; letter-spacing: 1px; margin-bottom: 4px; }
.preview .doc-sub { text-align: center; color: #62707d; font-size: 11px; margin-bottom: 14px; }
.preview table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 12px; }
.preview table td, .preview table th { border: 1px solid #b9c4cf; padding: 4px 6px; vertical-align: top; }
.preview .kv { display: flex; gap: 8px; margin: 3px 0; }
.preview .kv .k { color: #62707d; min-width: 120px; }
.preview .clause { margin: 6px 0; font-size: 11.5px; line-height: 1.5; }
.preview .sign { display: flex; justify-content: space-between; margin-top: 30px; font-size: 12px; }
.preview .totals { text-align: right; font-weight: 700; margin-top: 8px; }

.validate-msg { padding: 8px 12px; font-size: 12px; min-height: 8px; }
.validate-msg.ok { background: #e6f4ea; color: #1e6b32; }
.validate-msg.err { background: #fdecea; color: #b3261e; }

/* 工具面板 */
.workspace.toolmode .ws-bar,
.workspace.toolmode .ws-body { display: none; }
.tool-panel { display: flex; flex-direction: column; overflow-y: auto; padding: 16px 20px; gap: 12px; }
.tool-head h2 { font-size: 18px; color: #1e3a5f; text-align: left; }
.tool-desc { font-size: 12px; color: #62707d; margin-bottom: 4px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.tool-result { font-size: 12px; }
.tool-presets, .tool-actions { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.tool-panel .btn.ghost { background: #fff; color: #1e3a5f; }
.tool-panel .btn.primary { background: #2e7d32; border-color: #2e7d32; }
hr { border: none; border-top: 1px dashed #d6dee7; margin: 10px 0; }
.result-card { background: #f0f4f8; border: 1px solid #d6dee7; border-radius: 8px; padding: 12px 14px; margin: 8px 0; }
.result-card.big .rv { font-size: 22px; font-weight: 700; color: #1e3a5f; }
.result-card .rl { font-size: 12px; color: #62707d; }
.result-card .rarrow { font-size: 12px; color: #9aa6b2; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.card { border: 1px solid #e3e8ee; border-radius: 8px; padding: 12px; text-align: center; background: #fff; }
.card .cl { font-size: 11px; color: #62707d; margin-bottom: 4px; }
.card .cv { font-size: 18px; font-weight: 700; color: #1e3a5f; }
.card.green { background: #e9f7ef; } .card.green .cv { color: #1e6b32; }
.card.blue { background: #eaf1fb; } .card.blue .cv { color: #1d4ed8; }
.card.amber { background: #fdf2e3; } .card.amber .cv { color: #b45309; }
.card.big { background: #eef3f8; }
.mono { font-family: monospace; font-weight: 600; color: #1e3a5f; }

/* ===== 头部隐私声明横幅（醒目） ===== */
.privacy-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 16px; background: #fff7e6; border-bottom: 2px solid #f5a623; color: #6b4a00; flex-wrap: wrap; }
.pb-left { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 280px; }
.pb-lock { font-size: 18px; }
.pb-text { font-size: 12.5px; line-height: 1.4; }
.pb-text b { color: #b45309; }
.pb-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.folder-status { font-size: 12px; padding: 4px 10px; border-radius: 4px; background: #efe3c7; color: #6b4a00; }
.folder-status.ok { background: #e6f4ea; color: #1e6b32; }
/* 试用版提示条：仅试用授权显示，正式版不显示 */
.trial-banner { display: flex; align-items: center; gap: 10px; padding: 9px 16px; background: linear-gradient(90deg,#fff3e0,#ffe9c7); border-bottom: 2px solid #f57c00; color: #7a3e00; font-size: 13px; flex-wrap: wrap; }
.trial-banner[hidden] { display: none; }
.tb-icon { font-size: 17px; }
.tb-text { font-weight: 600; }
.tb-text b { color: #d84315; }
.tb-contact { margin-left: auto; padding: 4px 14px; border-radius: 14px; background: #f57c00; color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; }
.tb-contact:hover { background: #ef6c00; }

.layout { height: calc(100vh - 92px); }

/* 锁定态：仅可见不可填 */
body.locked .field input, body.locked .field select, body.locked .field textarea,
body.locked .items-table input, body.locked .tool-panel input, body.locked .tool-panel select { background: #f2f2f2; color: #9aa6b2; cursor: not-allowed; }
body.locked .privacy-banner { background: #fdecea; border-bottom-color: #b3261e; color: #7a1d16; }
body.locked .pb-text b { color: #b3261e; }

/* ===== 数据管理弹窗 ===== */
.modal-mask { position: fixed; inset: 0; background: rgba(15,30,50,.45); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal { background: #fff; width: min(720px, 94vw); max-height: 86vh; border-radius: 10px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,.3); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: #1e3a5f; color: #fff; }
.modal-head h2 { font-size: 15px; font-weight: 600; }
.dm-folder { font-size: 12px; opacity: .85; margin-left: 8px; font-weight: 400; }
.modal-close { background: transparent; border: none; color: #fff; font-size: 18px; cursor: pointer; }
.dm-toolbar { display: flex; align-items: center; gap: 6px; padding: 10px 16px; border-bottom: 1px solid #e3e8ee; flex-wrap: wrap; }
.dm-toolbar .input-field { flex: 1; min-width: 200px; padding: 6px 8px; border: 1px solid #d6dee7; border-radius: 4px; }
.dm-sort-label { font-size: 12px; color: #62707d; }
.dm-list { overflow-y: auto; padding: 8px 16px; flex: 1; }
.dm-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border: 1px solid #eef1f4; border-radius: 6px; margin-bottom: 6px; }
.dm-row:hover { border-color: #1e3a5f; background: #f7faff; }
.dm-title { font-size: 13px; font-weight: 600; color: #1f2933; }
.dm-sub { font-size: 11px; color: #9aa6b2; margin-top: 2px; font-family: monospace; }
.dm-actions { display: flex; gap: 6px; flex-shrink: 0; }
.dm-empty { padding: 30px 10px; text-align: center; color: #9aa6b2; font-size: 13px; }
.dm-foot { padding: 8px 16px; border-top: 1px solid #e3e8ee; font-size: 11px; color: #9aa6b2; }
.dm-badge { display: inline-block; font-size: 10px; padding: 1px 7px; border-radius: 10px; margin-left: 6px; background: #eef1f4; color: #62707d; }
.dm-badge.ok { background: #e6f4ea; color: #1e6b32; }
.dm-badge.warn { background: #fdf2e3; color: #b45309; }

/* ===== 防误触按钮 ===== */
.btn.warn { background: #b45309; border-color: #b45309; }
.btn.accent { background: #1d4ed8; border-color: #1d4ed8; }

/* ===== 签署与审核流程 ===== */
.sign-panel { border-top: 2px solid #1e3a5f; padding: 12px 16px; background: #fbfcfe; }
.sign-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.sign-head h3 { font-size: 13px; color: #1e3a5f; margin: 0; }
.sign-badge { font-size: 11px; padding: 2px 10px; border-radius: 12px; background: #eef1f4; color: #62707d; }
.sign-badge.ok { background: #e6f4ea; color: #1e6b32; }
.sign-badge.warn { background: #fdf2e3; color: #b45309; }
.decl { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #1f2933; background: #fff7e6; border: 1px solid #f5d98a; padding: 6px 8px; border-radius: 4px; margin-bottom: 10px; }
.decl input { width: auto; }
.sign-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sign-slot { border: 1px solid #e3e8ee; border-radius: 6px; padding: 8px; background: #fff; }
.sign-slot-title { font-size: 12px; font-weight: 600; color: #1e3a5f; margin-bottom: 6px; }
.sign-slot-title .ok { color: #1e6b32; margin-left: 4px; }
.sign-row { display: flex; gap: 6px; margin-bottom: 6px; }
.sign-row .input-field { flex: 1; }
.sign-canvas { background: #fff; border: 1px solid #d6dee7; border-radius: 4px; touch-action: none; width: 100%; max-width: 300px; height: 90px; cursor: crosshair; }
.sign-actions { display: flex; gap: 6px; margin-top: 6px; }

/* 预览中的签名块 */
.preview .sign-block { margin-top: 24px; border-top: 1px solid #b9c4cf; padding-top: 10px; font-size: 12px; }
.preview .decl-text { color: #62707d; font-style: italic; margin-bottom: 8px; }
.preview .sign-line { margin: 6px 0; display: flex; align-items: center; gap: 8px; }
.preview .sign-img { height: 38px; vertical-align: middle; border-bottom: 1px solid #333; }
.preview .sign-status { margin-top: 6px; font-weight: 600; color: #1e6b32; }

/* ===== 导入 / 转发 弹窗 ===== */
.imp-body { padding: 14px 16px; overflow-y: auto; }
.imp-hint { font-size: 12px; color: #62707d; background: #eef3f8; border: 1px solid #d6e2ee; padding: 8px 10px; border-radius: 4px; margin-bottom: 10px; }
.imp-preview { margin-top: 10px; max-height: 50vh; overflow-y: auto; }
.imp-fields { width: 100%; border-collapse: collapse; font-size: 12px; }
.imp-fields td { border: 1px solid #d6dee7; padding: 4px 6px; }
.imp-fields td.k { width: 40%; background: #f0f4f8; color: #62707d; }
.imp-note { font-size: 12px; color: #1e3a5f; font-weight: 600; margin: 6px 0; }
.imp-actions { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.fwd-channels { display: flex; gap: 12px; margin: 14px 0; }
.btn.big { padding: 14px 20px; font-size: 14px; }
.fwd-status { margin: 8px 0; }
.fwd-result { margin-top: 8px; }
.fwd-result pre { white-space: pre-wrap; border: 1px solid #d6dee7; padding: 8px; border-radius: 4px; font-size: 12px; }

/* ===== 角色视角 (#6) ===== */
.role-modal { width: min(760px, 94vw); }
.role-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.role-chip { background: #f0f4f8; color: #1e3a5f; border: 1px solid #d6dee7; }
.role-chip.active { background: #1e3a5f; color: #fff; border-color: #1e3a5f; }
.role-body { padding: 4px 2px; }
.role-title { font-size: 15px; color: #1e3a5f; margin-bottom: 6px; }
.role-cares { font-size: 12.5px; line-height: 1.6; background: #eef3f8; border-left: 3px solid #1e3a5f; padding: 8px 10px; border-radius: 4px; margin-bottom: 12px; }
.role-check { font-size: 13px; margin-bottom: 6px; }
.role-list { list-style: none; padding: 0; margin: 0 0 8px; }
.role-list li { font-size: 12.5px; padding: 5px 8px; border-radius: 4px; margin-bottom: 4px; }
.role-list li.ok { background: #e9f7ef; color: #1e6b32; }
.role-list li.warn { background: #fdf2e3; color: #b45309; }
.role-list li i { font-style: normal; opacity: .8; }
.role-ok { font-size: 12.5px; color: #1e6b32; background: #e6f4ea; padding: 6px 8px; border-radius: 4px; display: inline-block; }
.role-note { font-size: 12px; color: #62707d; background: #fff7e6; border: 1px solid #f5d98a; padding: 8px 10px; border-radius: 4px; margin-top: 10px; line-height: 1.6; }
.role-nodoc { font-size: 12.5px; color: #b3261e; background: #fdecea; padding: 10px; border-radius: 4px; }

/* 预览中的合规脚注 (#7) */
.preview .compliance-foot { margin-top: 28px; border-top: 1px dashed #b9c4cf; padding-top: 10px; font-size: 10.5px; line-height: 1.6; color: #62707d; background: #fafbfc; }

/* ===================== 语义化标题重置 ===================== */
.topbar h1.brand { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.3; }
.sidebar h2 { font-size: 13px; margin: 0 0 8px; color: #1e3a5f; font-weight: 700; }

/* ===================== 基础信息库（四维逐项确认） ===================== */
.master-hint { font-size: 11px; line-height: 1.5; color: #6b4a00; background: #fff7e6; border: 1px solid #f5d98a; border-radius: 4px; padding: 6px 8px; margin: 0 0 8px; }
.basic-none { grid-column: 1/-1; font-size: 12px; color: #9aa6b2; padding: 10px 4px; }
.master-form { display: block; }
#basicsEntrySel { margin-bottom: 8px; }
.basic-card { border: 1px solid #d6dee7; border-radius: 6px; padding: 8px; background: #fbfcfe; }
.basic-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px dashed #d6dee7; }
.basic-name { font-size: 12.5px; font-weight: 700; color: #1e3a5f; word-break: break-all; }
.badge { font-size: 10px; padding: 2px 8px; border-radius: 10px; white-space: nowrap; background: #eef1f4; color: #62707d; }
.badge.ok { background: #e6f4ea; color: #1e6b32; }
.badge.warn { background: #fdf2e3; color: #b45309; }
.basic-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.basic-fields .full { grid-column: 1/-1; }
.basic-refs { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #d6dee7; display: grid; gap: 6px; }
.basic-refs select[multiple] { min-height: 62px; }
.basic-actions { margin-top: 10px; padding-top: 8px; border-top: 1px dashed #d6dee7; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.basic-actions .decl { width: 100%; margin-bottom: 2px; font-size: 10.5px; line-height: 1.45; }
.basic-actions .input-field { flex: 1; min-width: 90px; padding: 5px 7px; border: 1px solid #d6dee7; border-radius: 4px; }
.basic-confirm-by { font-size: 10.5px; color: #1e6b32; flex: 1; }

/* ===================== 引用面板与只读闸门 ===================== */
.ref-panel { border: 1px solid #b9d3f2; background: #f2f8ff; border-radius: 6px; padding: 10px; margin-bottom: 12px; }
.ref-title { font-size: 12px; font-weight: 700; color: #1d4ed8; margin-bottom: 8px; }
.ref-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.ref-row .full { grid-column: 1/-1; }
.ref-row select[multiple] { min-height: 62px; }
.ref-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.ref-ok { font-size: 11.5px; color: #1e6b32; font-weight: 600; }
.ref-warn { font-size: 11.5px; color: #b45309; }
.gate-banner { background: #fdecea; border: 1px solid #f0b4ae; border-left: 4px solid #b3261e; color: #7a1d16; font-size: 12px; line-height: 1.6; padding: 10px 12px; border-radius: 4px; margin-bottom: 12px; }
.doc-empty { font-size: 12.5px; line-height: 1.7; color: #62707d; background: #f4f6f8; border: 1px dashed #d6dee7; border-radius: 6px; padding: 14px; }

/* ===================== 顶部三级流程条 + 事件控件 ===================== */
.event-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 7px 12px; background: #eaf1fb; border-bottom: 1px solid #c8d9ef; flex-shrink: 0; }
.eb-steps { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #1e3a5f; flex-wrap: wrap; }
.eb-step { padding: 3px 8px; border-radius: 12px; background: #fff; border: 1px solid #c8d9ef; white-space: nowrap; }
.eb-step b { color: #1d4ed8; margin-right: 3px; }
.eb-step.done { background: #e6f4ea; border-color: #9fd0ae; color: #1e6b32; }
.eb-step.done b { color: #1e6b32; }
.eb-step.current { background: #1e3a5f; border-color: #1e3a5f; color: #fff; }
.eb-step.current b { color: #ffd77a; }
.eb-arrow { color: #9aa6b2; font-size: 11px; }
.eb-controls { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.eb-label { font-size: 11px; color: #1e3a5f; font-weight: 600; white-space: nowrap; }
.event-sel { max-width: 200px; min-width: 130px; padding: 5px 6px; border: 1px solid #c8d9ef; border-radius: 4px; font-size: 11.5px; background: #fff; }
.event-status { font-size: 11px; color: #1e6b32; font-weight: 600; white-space: nowrap; }

/* 新手引导提示条 */
.onboard-tip { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #fffbe9; border-bottom: 1px solid #f0dfa8; flex-shrink: 0; }
.ob-icon { font-size: 18px; }
.ob-text { flex: 1; font-size: 12px; line-height: 1.55; color: #6b4a00; }

/* ===================== 表单内法规红线实时条 ===================== */
.reg-strip { margin-bottom: 10px; }
.reg-strip:empty { display: none; }
.reg-strip-head { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: #7a1d16; background: #fdecea; border: 1px solid #f0b4ae; border-left: 4px solid #b3261e; padding: 7px 10px; border-radius: 4px; margin-bottom: 6px; flex-wrap: wrap; }
.reg-strip-head.ok { color: #1e6b32; background: #e6f4ea; border-color: #9fd0ae; border-left-color: #2e7d32; }
.reg-item { font-size: 11.5px; line-height: 1.6; padding: 7px 10px; border-radius: 4px; margin-bottom: 5px; border: 1px solid #e3e8ee; background: #fbfcfe; }
.reg-item.block { background: #fdecea; border-color: #f0b4ae; color: #7a1d16; }
.reg-item.warn { background: #fff7e6; border-color: #f5d98a; color: #6b4a00; }
.reg-item .reg-basis { display: inline-block; font-size: 10px; padding: 1px 7px; border-radius: 10px; background: #1e3a5f; color: #fff; margin-right: 6px; }
.reg-item .reg-ref { display: block; font-size: 10.5px; color: #62707d; margin-top: 3px; }
.reg-tip { font-size: 11.5px; color: #1e3a5f; background: #eef3f8; border: 1px solid #d6e2ee; padding: 7px 10px; border-radius: 4px; line-height: 1.6; }

/* ===================== 事件绑定弹窗 ===================== */
#evModal { width: min(680px, 94vw); }
.ev-reg-preview { margin-top: 10px; font-size: 11.5px; line-height: 1.6; background: #f7faff; border: 1px solid #d6e2ee; border-radius: 4px; padding: 8px 10px; color: #1e3a5f; }
.ev-reg-preview b { color: #b3261e; }
.ev-foot-note { font-size: 11px; color: #62707d; }

/* ===================== 事件连贯审核弹窗 ===================== */
.audit-modal { width: min(820px, 95vw); }
.audit-body h4.audit-h { font-size: 12.5px; color: #1e3a5f; margin: 14px 0 7px; padding-bottom: 4px; border-bottom: 1px dashed #d6dee7; }
.audit-list { list-style: none; padding: 0; margin: 0 0 6px; }
.audit-list li { font-size: 12px; line-height: 1.6; padding: 6px 9px; border-radius: 4px; margin-bottom: 4px; }
.audit-list li.ok { background: #e9f7ef; color: #1e6b32; }
.audit-list li.warn { background: #fdf2e3; color: #8a5a00; }
.audit-list li.block { background: #fdecea; color: #7a1d16; }
.audit-none { font-size: 12px; color: #1e6b32; background: #e6f4ea; padding: 7px 10px; border-radius: 4px; }
.audit-foot { margin-top: 16px; padding-top: 12px; border-top: 1px solid #e3e8ee; display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.audit-block { flex: 1; min-width: 240px; font-size: 12px; color: #b3261e; background: #fdecea; border: 1px solid #f0b4ae; padding: 8px 10px; border-radius: 4px; line-height: 1.6; }
.audit-ok { flex: 1; min-width: 240px; font-size: 12px; color: #1e6b32; background: #e6f4ea; border: 1px solid #9fd0ae; padding: 8px 10px; border-radius: 4px; }
.audit-check { width: 100%; font-size: 12px; color: #1e3a5f; background: #eef3f8; border: 1px solid #d6e2ee; padding: 8px 10px; border-radius: 4px; display: flex; align-items: center; gap: 8px; }
.audit-check input { width: auto; }
.audit-reg-item { font-size: 11.5px; line-height: 1.55; }

/* ===================== 法规速查弹窗 ===================== */
.reg-modal { width: min(900px, 95vw); }
.reg-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.reg-toolbar label { font-size: 12px; color: #1e3a5f; font-weight: 600; white-space: nowrap; }
.reg-toolbar .input-field { max-width: 280px; padding: 6px 8px; border: 1px solid #d6dee7; border-radius: 4px; }
.reg-scope { font-size: 11.5px; line-height: 1.65; background: #eef3f8; border: 1px solid #d6e2ee; border-left: 3px solid #1e3a5f; padding: 9px 11px; border-radius: 4px; margin-bottom: 12px; color: #1f2933; }
.reg-scope b { color: #1e3a5f; }
.reg-sec-h { font-size: 13px; color: #1e3a5f; margin: 16px 0 8px; padding-bottom: 5px; border-bottom: 1px dashed #d6dee7; }
.reg-cat-h { font-size: 12px; color: #1d4ed8; margin: 12px 0 6px; }
.reg-card { border: 1px solid #e3e8ee; border-left: 3px solid #9aa6b2; border-radius: 4px; padding: 8px 10px; margin-bottom: 6px; background: #fbfcfe; font-size: 11.5px; line-height: 1.65; }
.reg-card.block { border-left-color: #b3261e; background: #fef6f5; }
.reg-card.warn { border-left-color: #f5a623; background: #fffbf2; }
.reg-card .r-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.reg-chip { font-size: 10px; padding: 1px 7px; border-radius: 10px; background: #eef1f4; color: #62707d; }
.reg-chip.block { background: #fdecea; color: #b3261e; }
.reg-chip.law { background: #1e3a5f; color: #fff; }
.reg-chip.standard { background: #1d4ed8; color: #fff; }
.reg-chip.authority { background: #6b46a3; color: #fff; }
.reg-card .r-ref { display: block; font-size: 10.5px; color: #62707d; margin-top: 4px; }
.reg-card .r-en { display: block; font-size: 11px; color: #62707d; margin-top: 4px; font-style: italic; }
.reg-summary { font-size: 11.5px; line-height: 1.6; background: #f7faff; border: 1px solid #d6e2ee; border-radius: 4px; padding: 8px 10px; margin-bottom: 10px; }
.reg-summary dl { display: grid; grid-template-columns: 96px 1fr; gap: 3px 8px; margin: 0; }
.reg-summary dt { color: #62707d; }
.reg-summary dd { margin: 0; color: #1f2933; }

/* ===================== 使用引导弹窗 ===================== */
.help-modal { width: min(720px, 94vw); }
.help-step { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px dashed #d6dee7; }
.help-step:last-of-type { border-bottom: none; }
.help-num { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: #1e3a5f; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.help-step h4 { font-size: 13px; color: #1e3a5f; margin: 0 0 5px; }
.help-step p { font-size: 12px; line-height: 1.7; color: #1f2933; margin: 0 0 5px; }
.help-step .help-why { font-size: 11.5px; color: #62707d; background: #f4f6f8; padding: 6px 8px; border-radius: 4px; line-height: 1.6; }
.help-note { font-size: 11.5px; line-height: 1.65; color: #6b4a00; background: #fff7e6; border: 1px solid #f5d98a; padding: 9px 11px; border-radius: 4px; margin-top: 12px; }
.help-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

/* ===================== SEO / GEO 静态可见内容区 ===================== */
.seo-block { padding: 10px 16px 24px; background: #f4f6f8; border-top: 1px solid #e3e8ee; }
.seo-details { max-width: 1100px; margin: 0 auto; background: #fff; border: 1px solid #e3e8ee; border-radius: 6px; }
.seo-details > summary { cursor: pointer; padding: 10px 14px; font-size: 12.5px; font-weight: 600; color: #1e3a5f; list-style: none; }
.seo-details > summary::-webkit-details-marker { display: none; }
.seo-details > summary::before { content: '▸ '; color: #1d4ed8; }
.seo-details[open] > summary::before { content: '▾ '; }
.seo-inner { padding: 4px 18px 18px; font-size: 12.5px; line-height: 1.8; color: #1f2933; }
.seo-inner section { margin-bottom: 18px; }
.seo-inner h2 { font-size: 15px; color: #1e3a5f; margin: 14px 0 8px; }
.seo-inner h3 { font-size: 13px; color: #1d4ed8; margin: 12px 0 6px; }
.seo-inner p, .seo-inner li { font-size: 12.5px; line-height: 1.8; }
.seo-inner ul, .seo-inner ol { padding-left: 22px; margin: 6px 0; }
.seo-inner li { margin-bottom: 5px; }
.seo-inner strong { color: #1e3a5f; }
.faq-list { margin: 6px 0; }
.faq-list dt { font-weight: 700; color: #1e3a5f; margin-top: 12px; font-size: 12.5px; }
.faq-list dd { margin: 4px 0 0 0; font-size: 12.5px; line-height: 1.8; }
.seo-disclaimer { font-size: 11.5px; color: #7a1d16; background: #fdecea; border: 1px solid #f0b4ae; padding: 8px 10px; border-radius: 4px; line-height: 1.7; margin-top: 10px; }
.seo-foot { font-size: 11px; color: #9aa6b2; border-top: 1px dashed #d6dee7; padding-top: 10px; margin-top: 10px; }
.noscript-note { padding: 14px 18px; background: #fff7e6; border: 1px solid #f5a623; color: #6b4a00; font-size: 13px; line-height: 1.7; }

/* 窄屏适配 */
@media (max-width: 1100px) {
  .eb-controls { margin-left: 0; width: 100%; }
  .sidebar { width: 280px; }
  .ref-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .layout { flex-direction: column; height: auto; }
  .sidebar { width: 100%; border-right: none; border-bottom: 1px solid #e3e8ee; }
  .ws-body { flex-direction: column; }
  .form-pane, .preview-pane { width: 100%; border-right: none; }
  .basic-fields { grid-template-columns: 1fr; }
}

/* 语言区块互斥显示；[hidden] 必须压过 .seo-inner 的 display 规则 */
[hidden] { display: none !important; }
.faq-item { margin: 0 0 14px; }
.faq-item h4 { margin: 0 0 5px; font-size: 14px; color: #1e3a5f; }
.faq-item p { margin: 0; font-size: 13px; line-height: 1.7; color: #44546a; }

/* 全球国家/地区：搜索框、分组下拉、覆盖统计 */
.reg-toolbar .input-field { width: 100%; box-sizing: border-box; }
.reg-toolbar #regSearch { margin-bottom: 6px; }
#evCountrySearch { width: 100%; box-sizing: border-box; margin-bottom: 6px; }
.reg-coverage { background: #eef3f8; border: 1px solid #d6dee7; border-radius: 4px;
  padding: 7px 10px; font-size: 12px; color: #1e3a5f; margin: 6px 0 10px; }
.reg-group-note { display: block; margin-top: 4px; color: #6b4a00; font-size: 11.5px; line-height: 1.6; }

/* ---------- 快捷工具带：全局常驻 ---------- */
.tool-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 16px; background: linear-gradient(90deg, #eef4fb 0%, #f7fafd 100%);
  border-bottom: 1px solid #d8e3ef;
}
.tool-bar .tb-head {
  font-size: 12.5px; font-weight: 700; color: #fff; white-space: nowrap; letter-spacing: .2px;
  background: #1e3a5f; border-radius: 6px; padding: 4px 10px;
  box-shadow: 0 1px 3px rgba(30,58,95,.22);
}
.tool-bar .tb-items { display: flex; gap: 8px; flex-wrap: wrap; flex: 1 1 auto; }
.tool-bar .tb-hint { font-size: 11px; color: #8494a6; white-space: nowrap; }
.tool-pill {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  background: #fff; border: 1px solid #c9d8e8; border-radius: 999px;
  padding: 6px 13px; font-size: 13px; color: #1e3a5f; font-weight: 600;
  box-shadow: 0 1px 2px rgba(30,58,95,.06); transition: all .15s ease;
  font-family: inherit;
}
.tool-pill:hover { border-color: #2b6cb0; box-shadow: 0 2px 8px rgba(43,108,176,.18); transform: translateY(-1px); }
.tool-pill:active { transform: translateY(0); }
.tool-pill.active { background: #1e3a5f; border-color: #1e3a5f; color: #fff; box-shadow: 0 2px 10px rgba(30,58,95,.28); }
.tool-pill .tp-ico {
  font-size: 12.5px; line-height: 1; width: 21px; height: 21px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #e8f1fb; flex: 0 0 21px;
}
.tool-pill[data-tool="currency_converter"] .tp-ico { background: #e6f5ec; }
.tool-pill[data-tool="payment_calculator"] .tp-ico { background: #fff3e0; }
.tool-pill[data-tool="invoice_number"] .tp-ico { background: #ecebff; }
.tool-pill[data-tool="cost_estimation"] .tp-ico { background: #e4f4f8; }
.tool-pill.active .tp-ico { background: rgba(255,255,255,.22); }
@media (max-width: 760px) {
  .tool-bar .tb-hint { display: none; }
  .tool-pill { padding: 5px 10px; font-size: 12px; }
}
