/* ========================================================
   布谷智慧门户 - 组织架构调整沙盘 样式表
   设计风格遵循布谷智慧门户规范 (蓝白企业级、简洁克制)
   ======================================================== */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-border: #bfdbfe;
  
  --brand-teal: #008490;
  --brand-teal-light: #edf6f6;
  
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --border-line: #e2e8f0;
  --border-light: #f1f5f9;
  
  --color-danger: #ef4444;
  --color-danger-bg: #fef2f2;
  --color-danger-border: #fecaca;
  
  --color-success: #10b981;
  --color-success-bg: #ecfdf5;
  --color-success-border: #a7f3d0;
  
  --color-warning: #f59e0b;
  --color-warning-bg: #fffbeb;
  --color-warning-border: #fef3c7;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text-main);
  background-color: var(--bg-main);
  line-height: 1.5;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ================= 1. 顶部布谷智慧门户导航栏 ================= */
.bg-header {
  height: 52px;
  background: linear-gradient(90deg, #1860e6 0%, #2563eb 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  color: #ffffff;
  flex-shrink: 0;
  z-index: 50;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.bg-header-left {
  display: flex;
  align-items: center;
  gap: 32px;
}

.bg-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.bg-logo-icon {
  width: 22px;
  height: 22px;
}

.bg-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bg-nav-item {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 4px;
  transition: all 0.2s;
}

.bg-nav-item:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.15);
}

.bg-nav-item.active {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.22);
  font-weight: 600;
}

.bg-header-right {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
}

.bg-icon-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 4px;
}

.bg-icon-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.bg-lang-switch {
  cursor: pointer;
  color: rgba(255, 255, 255, 0.9);
}

.bg-user-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.bg-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffffff;
  color: #1860e6;
  font-size: 12px;
  font-weight: bold;
  display: grid;
  place-items: center;
}

.bg-user-name {
  color: #ffffff;
}

/* ================= 2. 子导航 / 面包屑栏 ================= */
.bg-subbar {
  height: 42px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-shrink: 0;
}

.bg-subbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.agent-mode-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  border: 1px solid var(--border-line);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.agent-mode-title {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 11px;
}

.agent-mode-select {
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  outline: none;
}

.agent-mode-select option {
  background: #ffffff;
  color: var(--text-main);
}

.bg-pill-tab {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 14px;
  border: 1px solid var(--primary-border);
}

.bg-subbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bg-scene-indicator {
  font-size: 12px;
  color: var(--text-muted);
}

/* 顶部报告快捷展开胶囊按钮 */
.btn-report-pill {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  border-radius: 14px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.15);
  animation: pulseGreenGlow 2.5s infinite;
}

@keyframes pulseGreenGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  50% { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0); }
}

.btn-report-pill:hover {
  background: #d1fae5;
  color: #065f46;
  border-color: #6ee7b7;
  transform: translateY(-1px);
}

/* 顶部布局视图切换组 (宽屏对话 / 左右1:1等宽 / 全屏报告) */
.layout-toggle-group {
  display: flex;
  background: #f1f5f9;
  border: 1px solid var(--border-line);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.layout-toggle-btn {
  background: transparent;
  border: none;
  border-radius: 4px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.layout-toggle-btn:hover {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.6);
}

.layout-toggle-btn.active {
  background: #ffffff;
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* 思考过程展开样式 - 规范化排版，移除粗糙的 monospace 和 pre-wrap 冲突 */
.thinking-box {
  margin-bottom: 8px;
  max-width: 900px;
}

.thinking-details {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  transition: all 0.2s ease;
}

.thinking-details[open] {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.thinking-details summary {
  cursor: pointer;
  color: #64748b;
  font-weight: 500;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
}

.thinking-details summary::-webkit-details-marker {
  display: none;
}

.thinking-details summary:hover {
  color: var(--primary);
}

.thinking-summary-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-thinking-reader {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 11px;
  color: #475569;
  padding: 2px 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-thinking-reader:hover {
  background: #eff6ff;
  color: #1860e6;
  border-color: #bfdbfe;
}

.thinking-content {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
  color: #334155;
  line-height: 1.7;
  max-height: 380px;
  overflow-y: auto;
  font-size: 12px;
}

/* 思考/等待动效 */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--primary);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 8px 12px;
  border-radius: 8px;
  max-width: 360px;
}

.typing-dots {
  display: inline-flex;
  gap: 3px;
}

.typing-dot {
  width: 4px;
  height: 4px;
  background: var(--primary);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* ================= 3. 主三栏布局与视图模式 ================= */
.sandbox-container {
  flex: 1;
  display: flex;
  overflow: hidden;
  height: calc(100vh - 94px);
  position: relative;
}

/* 模式 1：默认宽屏对话 (layout-dialogue-focus) - 中间对话栏占满全部可用空间，右侧报告隐藏 */
.sandbox-container.layout-dialogue-focus .sandbox-dialogue-pane {
  flex: 1;
  width: auto;
  min-width: 0;
  border-right: none;
}
.sandbox-container.layout-dialogue-focus .sandbox-report-pane {
  display: none !important;
}

/* 模式 2：左右等宽对照 (layout-split-equal) - 中间与右侧 1:1 等比例宽敞排列 */
.sandbox-container.layout-split-equal .sandbox-dialogue-pane {
  flex: 1;
  width: 50%;
  min-width: 480px;
  border-right: 1px solid var(--border-line);
}
.sandbox-container.layout-split-equal .sandbox-report-pane {
  flex: 1;
  width: 50%;
  min-width: 480px;
  display: flex !important;
}

/* 模式 3：报告全屏专注 (layout-report-focus) - 中间对话收起，右侧报告全屏展开 */
.sandbox-container.layout-report-focus .sandbox-dialogue-pane {
  display: none !important;
}
.sandbox-container.layout-report-focus .sandbox-report-pane {
  flex: 1;
  width: auto;
  min-width: 0;
  display: flex !important;
}

/* ================= 3.1 左栏：场景构思列表 ================= */
.sidebar-scenarios {
  width: 260px;
  background: #ffffff;
  border-right: 1px solid var(--border-line);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-header {
  padding: 14px;
  border-bottom: 1px solid var(--border-light);
}

.btn-create-scenario {
  width: 100%;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 9px 0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.2);
}

.btn-create-scenario:hover {
  background: var(--primary-hover);
}

.scenario-list {
  flex: 1;
  overflow-y: auto;
}

.scenario-card {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: all 0.15s;
  border-left: 3px solid transparent;
}

.scenario-card:hover {
  background: #f8fafc;
}

.scenario-card.active {
  background: #f0f7ff;
  border-left-color: var(--primary);
}

.scenario-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.scenario-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.badge-active {
  background: #dbeafe;
  color: #1e40af;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  white-space: nowrap;
  font-weight: 500;
}

.scenario-time {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 6px;
}

.sidebar-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--border-line);
  font-size: 12px;
  color: var(--primary);
  text-align: center;
  background: #fafafa;
  cursor: pointer;
}

/* ================= 3.2 中栏：沙盘对话与变更集 ================= */
.sandbox-dialogue-pane {
  width: 520px;
  background: #f8fafc;
  border-right: 1px solid var(--border-line);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

/* 顶部变更集卡片 */
.changeset-card {
  margin: 14px 16px 10px;
  background: #f0f7ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.05);
}

.changeset-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.changeset-title {
  font-size: 13px;
  font-weight: 600;
  color: #1e40af;
}

.changeset-title small {
  font-weight: 400;
  color: #3b82f6;
  font-size: 11px;
}

.changeset-list {
  padding-left: 20px;
  font-size: 13px;
  color: #1e293b;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.tag-append {
  background: #dcfce7;
  color: #15803d;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 6px;
  font-weight: 500;
}

/* 对话消息流 */
.chat-stream {
  flex: 1;
  overflow-y: auto;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chat-bubble {
  max-width: 900px;
  display: flex;
  flex-direction: column;
}

.chat-bubble.user {
  align-self: flex-end;
}

.chat-bubble.user .bubble-body {
  background: var(--primary);
  color: #ffffff;
  border-radius: 12px 12px 2px 12px;
  padding: 9px 14px;
  font-size: 13px;
}

.chat-bubble.bot {
  align-self: flex-start;
  max-width: 900px;
  width: fit-content;
}

.chat-bubble.bot .bubble-body {
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border-line);
  border-radius: 12px 12px 12px 2px;
  padding: 14px 18px;
  font-size: 13px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  line-height: 1.75;
}

/* 富文本 Markdown 渲染样式 - 企业级排版规范 */
.bubble-body.markdown-body h1,
.bubble-body.markdown-body h2,
.bubble-body.markdown-body h3,
.bubble-body.markdown-body h4 {
  margin-top: 14px;
  margin-bottom: 6px;
  font-weight: 650;
  color: #0f172a;
  line-height: 1.45;
}

.bubble-body.markdown-body h1 { 
  font-size: 16px; 
  border-bottom: 1px solid var(--border-line); 
  padding-bottom: 4px; 
  color: #0f172a;
}
.bubble-body.markdown-body h2 { 
  font-size: 14px; 
  color: #1e3a8a; 
  border-left: 3px solid #2563eb;
  padding-left: 6px;
  margin-top: 16px;
}
.bubble-body.markdown-body h3 { font-size: 13px; color: #334155; }
.bubble-body.markdown-body h4 { font-size: 12px; color: #475569; }

.bubble-body.markdown-body p {
  margin-top: 5px;
  margin-bottom: 9px;
  line-height: 1.7;
}

.bubble-body.markdown-body p:last-child {
  margin-bottom: 0;
}

.bubble-body.markdown-body strong,
.bubble-body.markdown-body b {
  font-weight: 600;
  color: #0f172a;
}

.bubble-body.markdown-body ul,
.bubble-body.markdown-body ol {
  padding-left: 20px;
  margin: 6px 0 10px;
}

.bubble-body.markdown-body li {
  margin: 4px 0;
  line-height: 1.65;
}

.bubble-body.markdown-body blockquote {
  border-left: 3px solid #3b82f6;
  background: #f0f7ff;
  padding: 9px 13px;
  margin: 9px 0;
  border-radius: 0 6px 6px 0;
  color: #1e40af;
  font-size: 12px;
  line-height: 1.65;
}

.bubble-body.markdown-body blockquote p {
  margin: 0;
}

.bubble-body.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.bubble-body.markdown-body th {
  background: #f8fafc;
  color: #334155;
  font-weight: 600;
  padding: 8px 11px;
  border: 1px solid #e2e8f0;
  text-align: left;
}

.bubble-body.markdown-body td {
  padding: 8px 11px;
  border: 1px solid #e2e8f0;
  color: #1e293b;
  vertical-align: top;
}

.bubble-body.markdown-body tr:nth-child(even) td {
  background: #fafbfc;
}

.bubble-body.markdown-body tr:hover td {
  background: #f0f7ff;
}

.bubble-body.markdown-body code {
  background: #f1f5f9;
  color: #0369a1;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
}

.bubble-body.markdown-body pre {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px 12px;
  margin: 8px 0;
  overflow-x: auto;
}

.bubble-body.markdown-body pre code {
  background: transparent;
  color: #334155;
  padding: 0;
}

.bubble-body.markdown-body hr {
  border: none;
  border-top: 1px solid var(--border-line);
  margin: 12px 0;
}

/* 气泡底部操作栏 (阅读器模式 / 复制 / 时间) */
.bubble-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 5px;
  padding: 0 4px;
}

.bubble-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bubble-action-btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.bubble-action-btn:hover {
  background: #eff6ff;
  color: #1860e6;
  border-color: #bfdbfe;
}

.bubble-time {
  font-size: 10px;
  color: var(--text-light);
}

.chat-bubble.user .bubble-time {
  text-align: right;
  margin-top: 4px;
}

/* 实体消歧卡片 - 独立候选选择组件 */
.disambiguation-card {
  background: #fffdf5;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 10px;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.08);
}

.disambiguation-header {
  font-size: 13px;
  font-weight: 600;
  color: #92400e;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.disambiguation-options {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.disambig-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #fef3c7;
  cursor: pointer;
  font-size: 12px;
  color: #78350f;
  transition: all 0.15s ease-in-out;
}

.disambig-option:hover {
  background: #fffbeb;
  border-color: #f59e0b;
  transform: translateX(2px);
}

.disambig-option input[type="radio"] {
  cursor: pointer;
  accent-color: #d97706;
  transform: scale(1.1);
}

.disambiguation-card.resolved {
  background: #f8fafc;
  border-color: #e2e8f0;
  box-shadow: none;
}
.disambiguation-card.resolved .disambiguation-header {
  color: #64748b;
}
.disambig-option.disabled {
  cursor: not-allowed !important;
  pointer-events: none !important;
  opacity: 0.65;
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #64748b !important;
  transform: none !important;
}
.disambig-option.selected {
  background: #f0fdf4 !important;
  border-color: #86efac !important;
  color: #166534 !important;
  font-weight: 600;
  opacity: 1 !important;
}
.disambig-option.selected input[type="radio"] {
  accent-color: #16a34a;
}
.disambig-badge-selected {
  margin-left: auto;
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
}
.btn-action-primary.disabled {
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.6;
}

/* 确认与报告提示卡片 */
.confirmation-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.btn-action-primary {
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-action-primary:hover {
  background: var(--primary-hover);
}

.btn-action-secondary {
  background: #ffffff;
  color: var(--text-muted);
  border: 1px solid var(--border-line);
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
}

.btn-action-secondary:hover {
  background: #f1f5f9;
}

/* 底部输入框 */
.dialogue-input-area {
  background: #ffffff;
  border-top: 1px solid var(--border-line);
  padding: 10px 16px 14px;
}

.quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.quick-prompt-chip {
  background: #f1f5f9;
  color: var(--text-muted);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid var(--border-line);
  transition: all 0.15s;
}

.quick-prompt-chip:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-border);
}

.chat-form {
  display: flex;
  gap: 8px;
}

.chat-input {
  flex: 1;
  border: 1px solid var(--border-line);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s;
}

.chat-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.btn-send {
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-send:hover {
  background: var(--primary-hover);
}

/* ================= 3.3 右栏：推演分析报告与行动清单 ================= */
.sandbox-report-pane {
  flex: 1;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.sandbox-report-pane.fullscreen-mode {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999;
}

.report-topbar {
  height: 46px;
  border-bottom: 1px solid var(--border-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: #ffffff;
  flex-shrink: 0;
}

.report-tabs {
  display: flex;
  gap: 16px;
  height: 100%;
}

.report-tab {
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  height: 100%;
  position: relative;
  padding: 0 4px;
}

.report-tab.active {
  color: var(--primary);
  font-weight: 600;
}

.report-tab.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
}

.report-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-tool {
  background: #ffffff;
  border: 1px solid var(--border-line);
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-tool:hover {
  background: #f8fafc;
  color: var(--primary);
  border-color: var(--primary-border);
}

.btn-tool-standalone {
  color: #334155;
  border-color: #cbd5e1;
  background: #ffffff;
}
.btn-tool-standalone:hover {
  background: #f1f5f9;
  color: var(--primary);
  border-color: #93c5fd;
}

.btn-tool-download {
  color: #0369a1;
  border-color: #bae6fd;
  background: #f0f9ff;
}
.btn-tool-download:hover {
  background: #e0f2fe;
  color: #0284c7;
  border-color: #7dd3fc;
}

.btn-tool-print {
  color: #475569;
  border-color: #cbd5e1;
  background: #ffffff;
}
.btn-tool-print:hover {
  background: #f8fafc;
  color: #1e293b;
  border-color: #94a3b8;
}

.btn-tool-close {
  color: #e11d48;
  border-color: #fecdd3;
  background: #fff1f2;
  font-weight: 600;
}
.btn-tool-close:hover {
  background: #ffe4e6;
  color: #be123c;
  border-color: #fda4af;
}

/* 报告主体滚动区域 */
.report-canvas, .checklist-canvas {
  flex: 1;
  overflow-y: auto;
  padding: 20px 28px;
  background: #f8fafc;
}

/* 空状态 */
.report-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-light);
  gap: 14px;
}

.empty-icon {
  width: 56px;
  height: 56px;
  stroke: #cbd5e1;
}

.empty-text {
  font-size: 13px;
  color: var(--text-muted);
}

/* ================= 4. 报告正文设计 (严格遵循 report-template(4).html 规范版式) ================= */
:root {
  --ink: #000000;
  --blue: #3B5BDB;
  --line: #e2e5e9;
  --t2: #000000;
  --t3: #5b6672;
}

.paper, .report-paper {
  max-width: 1280px;
  margin: 18px auto 28px;
  background: #ffffff;
  border: 1px solid #e3e6ea;
  border-radius: 8px;
  overflow: clip;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.report-head {
  padding: 24px 28px 20px;
}

.brand-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
  color: #4a535e;
}

.brand-mark {
  background: #edf6f6;
  color: var(--blue);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 6px;
}

.brand-mark svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 1.6;
}

.edition {
  font-size: 11px;
  color: #747c87;
  background: #f1f5f9;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
}

.report-head h1 {
  font-size: 27px;
  line-height: 1.35;
  margin: 15px 0 5px;
  font-weight: 650;
  color: #0f172a;
}

.subtitle {
  color: #666f7a;
  font-size: 13px;
  margin: 0;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 13px;
  font-size: 12px;
  color: #6a727d;
}

.meta b {
  font-weight: 500;
  color: #303944;
  margin-left: 8px;
}

.notice {
  margin: 12px 0 0;
  padding: 9px 13px;
  border: 1px solid #efd2ca;
  border-radius: 6px;
  background: #fff7f4;
  color: #8a2e1f;
  font-size: 12px;
}

/* 【调整概况 + 指标卡】 */
.summary {
  margin: 0 28px;
}

.summary-top {
  background: #ffffff;
  border: 1px solid #dde2e7;
  border-radius: 8px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 272px;
  gap: 24px;
}

.summary-top > * {
  min-width: 0;
}

.summary-top.wide {
  grid-template-columns: minmax(0, 1fr);
}

.eyebrow {
  font-size: 11px;
  font-weight: 500;
  color: #54616b;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 7px;
}

.eyebrow:before {
  content: "";
  height: 6px;
  width: 6px;
  background: var(--blue);
  border-radius: 2px;
}

.summary h2 {
  font-size: 21px;
  line-height: 1.45;
  margin: 0 0 6px;
  font-weight: 650;
  color: #0f172a;
}

.summary p {
  margin: 0;
  font-size: 13px;
  line-height: 1.85;
  color: #334155;
}

.summary-side {
  padding: 2px 0 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid #e2e8f0;
  padding-left: 18px;
}

.summary-side .label {
  font-size: 11px;
  color: #64707b;
  margin-bottom: 5px;
}

.summary-side strong {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.8;
  color: #3c4651;
  overflow-wrap: anywhere;
}

.ai-note {
  font-size: 11px;
  font-weight: 400;
  color: var(--t3);
  margin-bottom: 4px;
}

.kpi-head {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.kpi {
  border: 1px solid #e0e4e8;
  border-radius: 7px;
  background: #ffffff;
  padding: 12px 16px;
  min-width: 0;
  transition: all 0.15s ease;
}

.kpi.clickable {
  cursor: pointer;
}

.kpi.clickable:hover {
  border-color: #3B5BDB;
  box-shadow: 0 2px 8px rgba(59, 91, 219, 0.12);
}

.metric-label {
  font-size: 12px;
  color: #636d78;
  margin-bottom: 6px;
}

.metric-value {
  font-size: 28px;
  font-weight: 650;
  line-height: 1.3;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 5px;
  flex-wrap: wrap;
}

.metric-value small {
  font-size: 12px;
  font-weight: 400;
  color: #64748b;
}

.metric-separator {
  color: #9aa2ac;
  font-size: 23px;
  font-weight: 400;
}

.kpi-delta {
  font-size: 12px;
  font-weight: 600;
  margin-top: 5px;
  font-variant-numeric: tabular-nums;
}

.delta {
  font-weight: 600;
  white-space: nowrap;
}

.delta-up {
  color: #2f6b4f;
}

.delta-down {
  color: #8a2e1f;
}

.delta-flat {
  color: #4b5563;
}

/* 【内容主体与吸顶导航条】 */
.content {
  padding: 0 28px 28px;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #ffffff;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 20px;
  padding: 6px 0;
  border-bottom: 1px solid #e0e4e8;
}

.nav a {
  padding: 8px 12px;
  margin: 2px 0;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #2b3440;
  text-decoration: none;
  transition: all 0.15s ease;
}

.nav a:hover,
.nav a:focus,
.nav a:active {
  background: #dfe6ff;
  color: var(--blue);
  outline: 0;
}

.nav span {
  font-size: 11px;
  margin-right: 6px;
  color: var(--blue);
  font-weight: 600;
}

.nav .nav-top {
  margin-left: auto;
  color: var(--blue);
  font-weight: 600;
}

.section {
  margin-top: 26px;
  scroll-margin-top: 60px;
}

.section-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 0 0 12px;
}

.section-heading .num {
  background: #eef2ff;
  color: var(--blue);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 650;
}

.section-heading h2 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
  color: #0f172a;
}

.section-heading .aside {
  margin-left: auto;
}

.tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  line-height: 1.7;
  white-space: nowrap;
  padding: 2px 7px;
  border-radius: 4px;
  background: #f0f2f5;
  color: #000000;
}

.tag.hard {
  background: #ecf7f9;
  color: #2f6f7a;
}

.tag.soft {
  background: #eef2fc;
  color: #3d5a9c;
}

.tag.pending {
  background: #fff2da;
  color: #7a4a0c;
}

.tag.risk-potential {
  background: #fbeae5;
  color: #8a2e1f;
}

.tag.risk-conditional {
  background: #e9effb;
  color: #3d5a9c;
}

/* 高亮小徽章 flag */
.flag {
  display: inline;
  font-size: 11px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid transparent;
  line-height: 1.9;
  box-decoration-break: clone;
  overflow-wrap: anywhere;
}

.flag-missing {
  color: #4b5563;
  background: #ffffff;
  border: 1px dashed #8a949e;
}

.flag-missing:before {
  content: "∅ ";
}

.flag-warn {
  color: #7a4a0c;
  background: #fff2da;
  border-color: #ecd09a;
}

.flag-warn:before {
  content: "! ";
}

/* 【调整链路】 */
.change-chain {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f7f8fa;
  overflow: hidden;
}

.change-chain li {
  padding: 12px 14px 14px;
  position: relative;
  border-right: 1px solid var(--line);
}

.change-chain li:last-child {
  border-right: 0;
}

.change-chain li:not(:last-child):after {
  content: "→";
  position: absolute;
  right: -9px;
  top: 31px;
  background: #f7f8fa;
  z-index: 1;
  color: #939da8;
  font-size: 16px;
  line-height: 22px;
}

.chain-number {
  color: var(--t3);
  font-size: 11px;
}

.change-chain h3 {
  font-size: 13px;
  margin: 4px 0 5px;
  font-weight: 600;
  color: #1e293b;
}

.change-chain p {
  font-size: 13px;
  line-height: 1.75;
  margin: 0;
  color: #475569;
}

/* 【组织架构对比】 */
.org-comparison {
  border: 1px solid #dfe3e8;
  border-radius: 7px;
  overflow: hidden;
  background: #ffffff;
}

.org-comparison-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: #f7f8fa;
}

.org-legend {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 11px;
  color: #66717c;
}

.org-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.sw {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #ffffff;
  border: 1px solid #b8c1ca;
}

.sw.new {
  background: #d9f3e8;
  border-color: #398763;
}

.sw.revoked {
  background: #fce5e0;
  border-color: #c77b67;
}

.sw.moved {
  background: #e4edfe;
  border-color: #4d7ab7;
}

.sw.absorb {
  background: #dfefef;
  border-color: var(--blue);
}

.org-panels {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.org-panel {
  min-width: 0;
  padding: 12px 10px 10px;
}

.org-panel + .org-panel {
  border-left: 1px solid var(--line);
  background: #f8f9fa;
}

.org-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px 10px;
}

.org-panel-title-area {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.org-panel-title-area h3 {
  font-size: 13px;
  margin: 0;
  font-weight: 600;
  color: #1e293b;
}

.org-panel-title-area > span {
  font-size: 11px;
  color: #94a3b8;
}

/* 组织架构独立缩放工具条 */
.org-panel-zoom-tools {
  display: flex;
  align-items: center;
  gap: 3px;
  background: #f1f5f9;
  padding: 2px 4px;
  border-radius: 5px;
  border: 1px solid #e2e8f0;
}

.btn-tree-zoom {
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 600;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.btn-tree-zoom:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #0284c7;
}

.tree-zoom-text {
  font-size: 11px;
  font-weight: 700;
  color: #0284c7;
  min-width: 36px;
  text-align: center;
  font-family: monospace;
  user-select: none;
}

.btn-tree-expand {
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 600;
  background: #e0f2fe;
  border: 1px solid #7dd3fc;
  border-radius: 3px;
  color: #0369a1;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-left: 2px;
  line-height: 1.2;
}

.btn-tree-expand:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

.org-viewport {
  width: 100%;
  overflow: auto;
  max-height: 480px;
  border-radius: 6px;
  position: relative;
  scrollbar-width: thin;
  cursor: grab;
  user-select: none;
  background: #ffffff;
  border: 1px solid #f1f5f9;
}

.org-viewport.is-dragging {
  cursor: grabbing !important;
}

.org-zoom-wrapper {
  position: relative;
  transform-origin: 0 0;
  transition: width 0.12s ease, height 0.12s ease;
}

.org-scene {
  width: 100%;
  min-width: var(--scene-width, 520px);
  position: relative;
  transform-origin: 0 0;
  transition: transform 0.12s ease;
}

.org-connectors {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  pointer-events: none;
}

.org-connectors path {
  stroke: #cbd5e1;
  stroke-width: 1.5;
  fill: none !important;
}

.org-connectors path.reporting {
  stroke: #0284c7;
  stroke-dasharray: 4 3;
}

/* 组织架构卡片规范 */
.org-card {
  position: absolute;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #ffffff;
  border: 1px solid #d2d8df;
  border-top: 3px solid #9aa6b2;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: all 0.15s ease;
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
}

.org-card:hover {
  box-shadow: 0 4px 12px rgba(59, 91, 219, 0.15);
  border-color: var(--blue);
  transform: translateY(-1px);
}

.org-card.root {
  text-align: center;
  border-top: 3px solid var(--blue);
  background: #f8fafc;
}

.org-card.root .nd-t {
  justify-content: center;
  color: #1e3a8a;
}

.org-card.root .nd-f {
  justify-content: center;
}

.org-card.position {
  padding: 6px 8px;
  border-radius: 5px;
}

.org-card-note {
  font-size: 10px;
  color: #64748b;
  line-height: 1.4;
  margin-top: 3px;
}

.removed-lane {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 10px 0 4px;
  flex-wrap: wrap;
}

.removed-chip {
  font-size: 11px;
  color: #b91c1c;
  border: 1px dashed #fca5a5;
  border-radius: 4px;
  background: #fff5f5;
  padding: 3px 8px;
}

.removed-chip b {
  font-weight: 600;
  margin-left: 6px;
  color: #dc2626;
}

.flow-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 9px 12px;
  background: #f0f9ff;
  border-top: 1px solid #e0f2fe;
  font-size: 12px;
  color: #0369a1;
}

.flow-strip .flow-arrow {
  color: #0284c7;
  font-weight: 600;
}

.flow-link {
  color: #0284c7;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.flow-link:hover {
  color: #0369a1;
}

/* 组织架构卡片与层级标签规范 (严格匹配原型) */
.nd {
  padding: 8px 10px;
  background: #ffffff;
  border: 1px solid #d2d8df;
  border-top: 3px solid #9aa6b2;
  border-radius: 5px;
  color: #303d48;
  text-align: left;
}

.nd-t {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.nd-t > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.nd-f {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  margin-top: 5px;
  font-size: 11px;
}

.nd-f b {
  font-weight: 600;
  color: #374956;
}

.lv {
  font-size: 10px;
  color: var(--t3);
  border: 1px solid #d2d8df;
  border-radius: 3px;
  padding: 0 3px;
  flex-shrink: 0;
}

.mk {
  font-size: 10px;
  font-weight: 450;
  line-height: 1.5;
  white-space: nowrap;
  padding: 1px 4px;
  border-radius: 3px;
  flex-shrink: 0;
}

.pos {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed #e2e5e9;
}

.pill {
  font-size: 11px;
  line-height: 1.6;
  padding: 0 7px;
  border-radius: 9px;
  border: 1px solid #d2d8df;
  background: #f7f8fa;
}

.s-new, .nd.s-new, .org-card.s-new {
  border-color: #a4c7b5;
  border-top: 3px solid #398763;
  background: #fcfefd;
}

.s-revoked, .nd.s-revoked, .org-card.s-revoked {
  border: 1px dashed #d8aaa0;
  border-top: 3px solid #c77b67;
  background: #fffcfb;
}

.s-revoked .nd-t > span:first-child,
.org-card.s-revoked .nd-t > span:first-child,
.pill.s-revoked {
  text-decoration: line-through;
  color: #a15b48;
}

.s-moved, .nd.s-moved, .org-card.s-moved {
  border-color: #a5b9d9;
  border-top: 3px solid #4d7ab7;
  background: #fcfdff;
}

.s-absorb, .nd.s-absorb, .org-card.s-absorb {
  border-color: #a6c8cd;
  border-top: 3px solid var(--blue);
  background: #ffffff;
}

.nd.s-absorb {
  border-top-color: var(--blue);
}

.mk.new {
  background: #eaf5ed;
  color: #307651;
}

.mk.revoked {
  background: #fff0e9;
  color: #a15b48;
}

.mk.moved {
  background: #edf2fb;
  color: #416ca9;
}

.mk.absorb {
  background: #e7f3f3;
  color: #00717c;
}

/* 调整前后对比表 (compare-table) */
.compare-wrap {
  margin-top: 14px;
  padding: 0 2px;
}

.compare-table {
  min-width: 520px;
  width: 100%;
  border-collapse: collapse;
}

.compare-table caption {
  caption-side: top;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  color: #1e293b;
}

th.n, td.n {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.compare-foot {
  font-size: 11px;
  color: var(--t3);
  margin: 6px 0 0;
  line-height: 1.6;
}

/* 【调整影响 (Insights)】 */
.insights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.insight {
  border: 1px solid #e0e4e8;
  border-radius: 7px;
  padding: 15px 16px;
  background: #ffffff;
}

.insight h3 {
  font-size: 12px;
  margin: 0;
  font-weight: 500;
  color: #68727e;
}

.insight .lead {
  font-size: 17px;
  font-weight: 600;
  margin: 8px 0 6px;
  line-height: 1.5;
  color: #0f172a;
}

.insight .text {
  font-size: 13px;
  line-height: 1.85;
  margin: 0;
  color: #334155;
}

/* 【变动明细 (Detail Blocks & Filter Pills)】 */
.block {
  border: 1px solid #dfe4e9;
  border-radius: 6px;
  margin-bottom: 12px;
  overflow: hidden;
  position: relative;
  background: #ffffff;
}

.block h3 {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
  padding: 12px 14px;
  color: #334155;
  display: flex;
  gap: 8px;
  align-items: center;
  background: #fcfdfe;
}

.cnt {
  font-size: 11px;
  font-weight: 400;
  color: var(--t3);
  margin-left: auto;
}

.block .table-wrap {
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}

.fbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 9px 13px;
  background: #fafbfc;
  border-top: 1px solid #e5e8ec;
}

.fbar label {
  padding: 3px 10px;
  font-size: 11px;
  border: 1px solid #dce2e7;
  border-radius: 5px;
  color: #64717d;
  background: #ffffff;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.fbar label i {
  font-style: normal;
  margin-left: 5px;
  color: #7a8691;
}

.fbar label.active,
.fbar label:hover {
  background: #edf2ff;
  border-color: #bac8ff;
  color: #3B5BDB;
  font-weight: 500;
}

.table-wrap {
  border: 1px solid #e0e4e8;
  border-radius: 6px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
  table-layout: fixed;
}

thead {
  background: #f5f6f8;
  color: #616d79;
  font-size: 12px;
}

th {
  font-weight: 500;
}

th, td {
  padding: 10px 12px;
  border-bottom: 1px solid #e8ebef;
  vertical-align: top;
  overflow-wrap: anywhere;
}

tbody tr:last-child td, tbody tr:last-child th {
  border-bottom: 0;
}

.strategy-table {
  min-width: 640px;
}

.strategy-table th:nth-child(1) { width: 13%; }
.strategy-table th:nth-child(2) { width: 23%; }
.strategy-table tbody th {
  font-weight: 550;
  background: #fafbfc;
  color: #465460;
}

.data-table {
  min-width: 660px;
}

.org-table {
  min-width: 700px;
}

.table-note {
  font-size: 11px;
  color: #7a4a0c;
  margin: 0;
  padding: 8px 14px;
  border-top: 1px solid var(--line);
}

/* 【行动清单与批导模板弹窗】 */
.act-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid #e0e4e8;
  border-radius: 7px;
  background: #ffffff;
}

.act-list li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #eaedf0;
}

.act-list li:last-child {
  border: 0;
}

.act-no {
  background: #eef2ff;
  color: var(--blue);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 600;
}

.act-body b {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
}

.act-body p {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 1.75;
  color: #475569;
}

.tpl-btn {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid #bac8ff;
  border-radius: 5px;
  background: #edf2ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tpl-btn:hover {
  background: #dbe4ff;
  border-color: #91a7ff;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 20000;
  background: rgba(27, 35, 48, 0.65);
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal:target, .modal.active {
  display: flex;
}

.modal-box {
  background: #ffffff;
  border-radius: 8px;
  width: min(920px, 100%);
  max-height: 85vh;
  overflow: auto;
  padding: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.modal-head h3 {
  font-size: 15px;
  margin: 0;
  font-weight: 650;
  color: #0f172a;
}

.modal-x {
  font-size: 12px;
  color: var(--t3);
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
}

.modal-x:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.tpl-table {
  table-layout: auto;
  width: max-content;
  min-width: 100%;
}

.tpl-table th, .tpl-table td {
  white-space: nowrap;
  padding: 7px 10px;
  font-size: 12px;
}

.modal-foot {
  margin-top: 14px;
  text-align: right;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.dl-btn {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 5px;
  background: var(--blue);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
}

.dl-btn:hover {
  background: #2b4acb;
}

/* 【分割线】 */
.ai-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 34px 0 10px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
}

.ai-divider:before, .ai-divider:after {
  content: "";
  flex: 1;
  border-top: 2px dashed #bac8ff;
}

/* 【战略作用】 */
.strategy-focus {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: #ffffff;
}

.strategy-focus h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 5px;
  color: #1e293b;
}

.strategy-focus p {
  font-size: 13px;
  line-height: 1.85;
  margin: 0;
  color: #475569;
}

.management-focus {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid #e5e8ec;
}

.focus-label {
  white-space: nowrap;
  font-size: 11px;
  font-weight: 600;
  color: var(--blue);
  background: #edf2ff;
  padding: 2px 6px;
  border-radius: 4px;
}

.management-focus p {
  font-size: 13px;
  margin: 0;
  line-height: 1.9;
  color: #334155;
}

/* 【风险与关注事项】 */
.risk-count {
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 8px;
  color: #64748b;
}

.risk-list {
  border: 1px solid #e0e4e8;
  border-radius: 7px;
  overflow: hidden;
  background: #ffffff;
}

.risk-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #eaedf0;
}

.risk-row:last-child {
  border: 0;
}

.risk-number {
  background: #fff5e5;
  color: #7a4a0c;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 600;
}

.risk-level {
  display: inline-block;
  min-width: 60px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 6px;
  color: #4b5563;
}

.lv-pending {
  background: #ffffff;
  border: 1px dashed #8a949e;
}

.risk-row h3 {
  font-size: 13px;
  margin: 0 0 4px;
  font-weight: 600;
  color: #1e293b;
}

.risk-row p {
  font-size: 13px;
  margin: 0;
  line-height: 1.85;
  color: #475569;
}

.plain .risk-number {
  background: #eef2ff;
  color: var(--blue);
}

/* 【页脚】 */
.report-footer {
  border-top: 1px solid #e4e7eb;
  background: #fafbfc;
  padding: 14px 28px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-size: 11px;
  color: var(--t3);
  margin-top: 24px;
}

.report-footer b {
  font-weight: 500;
  color: #63717e;
}

/* 响应式适配 (移动端 & 平板) */
@media(max-width: 900px) {
  .org-panels { grid-template-columns: minmax(0, 1fr); }
  .org-panel + .org-panel { border-left: 0; border-top: 1px solid var(--line); }
  .summary-top { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .summary-side { border-left: none; border-top: 1px solid #e2e8f0; padding-left: 0; padding-top: 14px; }
}

@media(max-width: 680px) {
  .paper, .report-paper { margin: 8px; border-radius: 7px; }
  .report-head { padding: 18px 16px 15px; }
  .report-head h1 { font-size: 23px; }
  .subtitle { font-size: 12px; }
  .meta { font-size: 11px; gap: 5px 13px; }
  .summary { margin: 0 16px; }
  .summary-top { padding: 14px; gap: 12px; }
  .summary h2 { font-size: 18px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 11px 12px; }
  .metric-value { font-size: 24px; }
  .content { padding: 0 16px 18px; }
  .nav { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; gap: 0 4px; margin: 10px 0 16px; scrollbar-width: none; }
  .nav a { flex: 0 0 auto; font-size: 12px; padding: 8px 8px; }
  .nav .nav-top { position: sticky; right: 0; background: #ffffff; padding-left: 10px; }
  .change-chain { grid-template-columns: minmax(0, 1fr); }
  .change-chain li { border-right: 0; border-bottom: 1px solid var(--line); }
  .change-chain li:last-child { border-bottom: 0; }
  .change-chain li:not(:last-child):after { display: none; }
  .insights { grid-template-columns: minmax(0, 1fr); }
  .risk-row { grid-template-columns: 24px minmax(0, 1fr); }
  .risk-row .tag { grid-column: 2; justify-self: start; margin-top: 4px; }
  .act-list li { grid-template-columns: 24px minmax(0, 1fr); }
  .act-list .tpl-btn { grid-column: 2; justify-self: start; margin-top: 6px; }
  .report-footer { padding: 11px 16px; display: block; }
}

/* 打印样式：只导出报告或行动清单内容，隐藏所有工作台控件与侧栏 */
@media print {
  @page {
    size: auto;
    margin: 15mm 12mm 15mm 12mm;
  }
  body {
    background: #ffffff !important;
    color: #000000 !important;
    height: auto !important;
    overflow: visible !important;
  }
  .bg-header, .bg-subbar, .sidebar-scenarios, .sandbox-dialogue-pane, .report-topbar,
  .no-print, .kpi-drill-hint, .kpi-drill-icon, .detail-filter-bar-container, .fbar,
  .rep-action-prep-banner, .btn-back-to-report, .reader-modal-backdrop, .toast-notification,
  .nav, .modal, .org-panel-zoom-tools, .btn-goto-checklist {
    display: none !important;
  }
  .sandbox-container {
    height: auto !important;
    display: block !important;
  }
  .sandbox-report-pane {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    border: none !important;
  }
  .report-canvas, .checklist-canvas {
    padding: 0 !important;
    overflow: visible !important;
    background: #ffffff !important;
  }
  .paper, .report-paper {
    border: none !important;
    box-shadow: none !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  .summary, .summary-top, .section, .org-comparison, .insight,
  .risk-row, .strategy-focus, .table-wrap tr, .block {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  .org-scene svg {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

/* ================= 4. 沉浸式独立阅读器组件 (Reader Mode Modal) ================= */
.reader-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease-out;
}

.reader-modal-window {
  width: 92vw;
  max-width: 1120px;
  height: 90vh;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: max-width 0.25s ease;
}

.reader-modal-window.narrow-mode {
  max-width: 820px;
}

.reader-modal-header {
  height: 58px;
  background: #fafbfc;
  border-bottom: 1px solid var(--border-line);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.reader-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.reader-icon {
  font-size: 22px;
}

.reader-main-title {
  font-size: 15px;
  font-weight: 650;
  color: #0f172a;
}

.reader-sub-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.reader-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.reader-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.font-size-ctrl {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--border-line);
  border-radius: 6px;
  padding: 2px 4px;
}

.font-size-ctrl .ctrl-btn {
  background: none;
  border: none;
  font-size: 12px;
  padding: 2px 6px;
  cursor: pointer;
  color: var(--text-main);
  font-weight: 600;
}

.font-size-ctrl .ctrl-label {
  font-size: 11px;
  color: var(--text-muted);
  padding: 0 4px;
}

.reader-controls .ctrl-btn {
  background: #ffffff;
  border: 1px solid var(--border-line);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s;
}

.reader-controls .ctrl-btn:hover {
  background: #f1f5f9;
  color: var(--primary);
  border-color: #cbd5e1;
}

.reader-close-btn {
  background: none;
  border: none;
  font-size: 18px;
  color: #64748b;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s;
}

.reader-close-btn:hover {
  background: #fee2e2;
  color: #dc2626;
}

.reader-modal-body {
  flex: 1;
  display: flex;
  overflow: hidden;
  background: #ffffff;
}

.reader-toc-pane {
  width: 240px;
  background: #f8fafc;
  border-right: 1px solid var(--border-line);
  padding: 18px 16px;
  overflow-y: auto;
  flex-shrink: 0;
}

.reader-toc-title {
  font-size: 12px;
  font-weight: 650;
  color: #475569;
  text-transform: uppercase;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.reader-toc-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.reader-toc-item {
  font-size: 12px;
  color: #475569;
  text-decoration: none;
  padding: 5px 8px;
  border-radius: 4px;
  line-height: 1.4;
  transition: all 0.15s;
  cursor: pointer;
  display: block;
}

.reader-toc-item:hover {
  background: #e2e8f0;
  color: var(--primary);
}

.reader-toc-item.level-1 { font-weight: 600; color: #1e293b; }
.reader-toc-item.level-2 { padding-left: 14px; color: #334155; }
.reader-toc-item.level-3 { padding-left: 24px; color: #64748b; font-size: 11px; }

.reader-paper-pane {
  flex: 1;
  overflow-y: auto;
  padding: 36px 48px;
  background: #ffffff;
}

.reader-paper-content {
  max-width: 860px;
  margin: 0 auto;
  font-size: var(--reader-font-size, 14px);
  line-height: 1.8;
  color: #1e293b;
}

.reader-paper-content h1 {
  font-size: 1.6em;
  margin-top: 18px;
  margin-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 6px;
  color: #0f172a;
}

.reader-paper-content h2 {
  font-size: 1.35em;
  margin-top: 20px;
  margin-bottom: 8px;
  color: #1e3a8a;
  border-left: 4px solid #2563eb;
  padding-left: 8px;
}

.reader-paper-content h3 {
  font-size: 1.15em;
  margin-top: 16px;
  margin-bottom: 6px;
  color: #334155;
}

.reader-paper-content p {
  margin-bottom: 12px;
  line-height: 1.8;
}

.reader-paper-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
}

.reader-paper-content th {
  background: #f1f5f9;
  font-weight: 600;
  padding: 10px 14px;
  border: 1px solid #cbd5e1;
  text-align: left;
}

.reader-paper-content td {
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
}

.reader-paper-content tr:nth-child(even) td {
  background: #f8fafc;
}

.reader-paper-content blockquote {
  border-left: 4px solid #3b82f6;
  background: #eff6ff;
  padding: 12px 18px;
  margin: 16px 0;
  border-radius: 0 8px 8px 0;
  color: #1e40af;
}

/* ========================================================
   4步推演闭环交互样式 (Roadshow 4-Step Closed-Loop Styles)
   01 架构对照 | 02 明细核对 | 03 追问影响 | 04 行动准备
   ======================================================== */

/* 01 架构对照：汇报关系与负责人展示 */
.tree-node-mgr {
  font-size: 11px;
  color: #334155;
  margin-top: 5px;
}
.tree-node-mgr b {
  color: #0f172a;
}

.tree-node-reporting {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.5;
  color: #1e3a8a;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 4px 8px;
  border-radius: 4px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.rep-line-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  background: #dbeafe;
  color: #1d4ed8;
  padding: 1px 5px;
  border-radius: 3px;
}

.rep-line-badge.highlight {
  background: #fef3c7;
  color: #b45309;
}

/* 02 明细核对：关键数字点击穿透与行级筛选 */
.rep-kpi-item.clickable {
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 6px;
  padding: 4px 18px;
}

.rep-kpi-item.clickable:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.kpi-drill-icon {
  font-size: 11px;
  opacity: 0.8;
  margin-left: 4px;
}

.kpi-clickable-part {
  cursor: pointer;
  border-bottom: 2px dashed rgba(255, 255, 255, 0.6);
  transition: all 0.15s ease;
  display: inline-block;
  padding: 0 2px;
}

.kpi-clickable-part:hover {
  color: #6ee7b7;
  border-bottom-color: #6ee7b7;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
}

.kpi-separator {
  font-size: 16px;
  color: #a6cbd0;
  margin: 0 4px;
}

.kpi-drill-hint {
  font-size: 10px;
  color: #a5f3fc;
  margin-top: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.rep-kpi-item.clickable:hover .kpi-drill-hint {
  opacity: 1;
}

/* 穿透后元素闪烁高亮聚焦动画 */
@keyframes flashGlow {
  0% {
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.7);
    background-color: #e0f2fe !important;
  }
  50% {
    box-shadow: 0 0 0 8px rgba(14, 165, 233, 0.4);
    background-color: #f0f9ff !important;
  }
  100% {
    box-shadow: none;
    background-color: inherit;
  }
}

.flash-highlight {
  animation: flashGlow 2.5s ease-out forwards;
  scroll-margin-top: 30px;
}

.org-card.flash-highlight,
.org-card.is-target {
  z-index: 10 !important;
  outline: 2px solid #0284c7 !important;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px rgba(2, 132, 199, 0.25) !important;
}

/* 明细表格穿透筛选指示条 */
.detail-filter-bar {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  padding: 7px 12px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #166534;
}

.btn-clear-filter {
  background: #ffffff;
  border: 1px solid #86efac;
  color: #15803d;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 500;
}

.btn-clear-filter:hover {
  background: #dcfce7;
  border-color: #4ade80;
}

/* 03 追问影响：对话气泡内追问建议 Chips */
.followup-impact-box {
  margin-top: 10px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
}

.followup-impact-title {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
}

.followup-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.followup-chip {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.followup-chip:hover {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
  transform: translateY(-1px);
}

/* 04 行动准备：报告底部落地清单跳转 Banner */
.rep-action-prep-banner {
  margin-top: 36px;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1px solid #86efac;
  border-radius: 8px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.08);
}

.rep-action-prep-title {
  font-size: 14px;
  font-weight: 700;
  color: #065f46;
  margin-bottom: 4px;
}

.rep-action-prep-desc {
  font-size: 12px;
  color: #047857;
  line-height: 1.5;
}

.rep-action-prep-left {
  flex: 1;
}

.btn-return-chat {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  padding: 5px 12px;
  font-size: 12px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}

.btn-return-chat:hover {
  background: #ffffff;
  color: #1860e6;
}

.btn-goto-checklist {
  flex-shrink: 0;
  background: #059669;
  color: #ffffff;
  border: none;
  font-size: 12px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.25);
  transition: all 0.2s ease;
}

.btn-goto-checklist:hover {
  background: #047857;
  transform: translateY(-1px);
}

.btn-back-to-report {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 4px;
  cursor: pointer;
  margin-bottom: 12px;
  transition: all 0.15s ease;
}

.btn-back-to-report:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* ==========================================================================
   落地行动清单表格、标签与历史兼容规范
   ========================================================================== */
.custom-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.custom-table th {
  background: #f7f8fa;
  color: #475569;
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}

.custom-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eef1f4;
  color: #1e293b;
  line-height: 1.6;
  vertical-align: middle;
}

.custom-table tr:last-child td {
  border-bottom: none;
}

.badge-conf {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.badge-conf.direct {
  background: #dcfce7;
  color: #15803d;
}

.badge-conf.review {
  background: #fef3c7;
  color: #92400e;
}

.badge-tag {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
}

.badge-tag.add {
  background: #dcfce7;
  color: #15803d;
}

.badge-tag.remove {
  background: #fee2e2;
  color: #b91c1c;
}

.badge-tag.modified {
  background: #e0f2fe;
  color: #0369a1;
}

/* 兼容历史类名 */
.rep-header {
  padding: 24px 28px 18px;
  border-bottom: 1px solid var(--line);
}

.rep-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #64748b;
}

.rep-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--blue);
  background: #edf2ff;
  padding: 3px 8px;
  border-radius: 4px;
}

.rep-title {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  margin: 12px 0 6px;
}

/* ==========================================================================
   4步组织推演仿真闭环流水线 & 报告卡片样式
   ========================================================================== */
.simulation-pipeline-card {
  margin: 12px 0 10px 0;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
}

.sim-pipeline-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.sim-pipeline-tag {
  background: #0284c7;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.sim-pipeline-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.simulation-steps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

@media (max-width: 600px) {
  .simulation-steps-grid {
    grid-template-columns: 1fr;
  }
}

.sim-step-item {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  position: relative;
  transition: all 0.15s ease;
}

.sim-step-item.done {
  border-left: 3px solid #10b981;
  background: #ffffff;
}

.sim-step-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  margin-bottom: 2px;
}

.sim-step-num {
  font-weight: 700;
  color: #64748b;
  font-family: monospace;
}

.sim-step-check {
  color: #059669;
  font-weight: 600;
  background: #dcfce7;
  padding: 1px 6px;
  border-radius: 10px;
}

.sim-step-title {
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
}

.sim-step-detail {
  font-size: 11px;
  color: #475569;
  line-height: 1.35;
}

/* 核心指标即时速览条 */
.report-kpi-preview-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 10px 0;
}

@media (max-width: 600px) {
  .report-kpi-preview-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}

.kpi-mini-card {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 6px 8px;
  text-align: center;
}

.kpi-mini-label {
  font-size: 10px;
  color: #64748b;
  margin-bottom: 2px;
}

.kpi-mini-val {
  font-size: 13px;
  font-weight: 700;
  color: #0284c7;
}

.kpi-mini-unit {
  font-size: 10px;
  font-weight: 400;
  color: #64748b;
}

/* 报告就绪 Banner */
.report-ready-banner {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 6px;
  margin-bottom: 12px;
  animation: fadeInDown 0.3s ease;
}

.report-ready-banner button {
  background: transparent;
  border: none;
  font-size: 14px;
  color: #059669;
  cursor: pointer;
  padding: 0 4px;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.pipeline-spinner {
  display: inline-block;
  animation: spinSlow 2s linear infinite;
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   组织架构全屏大图查看器弹窗 (Org Architecture Zoom Modal)
   ========================================================================== */
.org-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(5px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: orgModalFadeIn 0.2s ease-out;
}

@keyframes orgModalFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.org-modal-window {
  width: 96vw;
  height: 92vh;
  max-width: 1750px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #cbd5e1;
}

.org-modal-header {
  height: 52px;
  padding: 0 20px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.org-modal-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.org-modal-icon {
  font-size: 20px;
}

.org-modal-title-box {
  display: flex;
  flex-direction: column;
}

.org-modal-main-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.org-modal-sub-meta {
  font-size: 11px;
  color: #64748b;
}

.org-modal-view-tabs {
  display: flex;
  background: #f1f5f9;
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
  margin-left: 8px;
}

.org-modal-tab {
  border: none;
  background: transparent;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  color: #475569;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.org-modal-tab:hover {
  color: #0284c7;
}

.org-modal-tab.active {
  background: #ffffff;
  color: #0284c7;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.org-modal-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.org-modal-zoom-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 3px 8px;
}

.org-modal-btn {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.org-modal-btn:hover {
  background: #eff6ff;
  color: #0284c7;
  border-color: #93c5fd;
}

.org-modal-zoom-val {
  font-size: 12px;
  font-weight: 700;
  color: #0284c7;
  min-width: 44px;
  text-align: center;
  font-family: monospace;
}

.org-modal-close-btn {
  width: 30px;
  height: 30px;
  border: none;
  background: #f1f5f9;
  border-radius: 6px;
  font-size: 16px;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.org-modal-close-btn:hover {
  background: #fee2e2;
  color: #ef4444;
}

.org-modal-body {
  flex: 1;
  overflow: hidden;
  background: #f8fafc;
  position: relative;
}

.org-modal-pan-viewport {
  width: 100%;
  height: 100%;
  overflow: auto;
  cursor: grab;
  padding: 24px;
  box-sizing: border-box;
  scrollbar-width: thin;
}

.org-modal-pan-viewport.is-dragging {
  cursor: grabbing !important;
}

.org-modal-canvas {
  display: inline-block;
  min-width: 100%;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  padding: 20px;
  box-sizing: border-box;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.org-modal-panel-inner {
  display: flex;
  flex-direction: column;
}

.org-modal-panel-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e2e8f0;
}

.org-modal-panel-header h4 {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.org-modal-panel-sub {
  font-size: 12px;
  color: #64748b;
}

.org-modal-both-panels {
  display: flex;
  gap: 24px;
}

.org-modal-col {
  flex: 1;
  min-width: 520px;
}

.org-modal-divider {
  width: 1px;
  background: #e2e8f0;
}

.org-modal-footer {
  height: 34px;
  padding: 0 20px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #64748b;
  flex-shrink: 0;
}


