/* mini-excel-ai：对齐主站三视图 / AI 助手的关键样式（独立抽取，免引用整站 index.css） */

@keyframes miniSpin {
  to {
    transform: rotate(360deg);
  }
}

.mini-analyze-chrome {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 14px;
  background: #252530;
  border-bottom: 1px solid #2e2c36;
  font-size: 13px;
}

.mini-analyze-chrome-badge {
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(33, 115, 70, 0.38);
  color: #bbf7d0;
  font-weight: 700;
  border: 1px solid rgba(74, 222, 128, 0.35);
  white-space: nowrap;
}

.mini-analyze-chrome-meta {
  color: #94a3b8;
  line-height: 1.45;
  flex: 1;
  min-width: 200px;
}

/* 我要分析：excel-ai AnalyzeActionBar 同款工具条（表格上方） */
.mini-analyze-toolbar {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 14px 10px;
  background: #252530;
  border-bottom: 1px solid #2e2c36;
}

.mini-analyze-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.mini-analyze-toolbar-btn {
  padding: 5px 10px;
  background: #1e1d24;
  border: 1px solid #3f3d4a;
  border-radius: 6px;
  color: #c4bfc9;
  cursor: pointer;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: border-color 0.15s, background 0.15s;
  white-space: nowrap;
}

.mini-analyze-toolbar-btn:hover:not(:disabled) {
  background: #2a2833;
  border-color: #4ade80;
  color: #e8e4ef;
}

.mini-analyze-toolbar-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.mini-analyze-toolbar-meta {
  padding: 5px 10px;
  font-size: 13px;
  color: #8b8698;
  border: 1px solid #33313d;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.15);
  white-space: nowrap;
}

.mini-analyze-toolbar-status {
  padding: 5px 10px;
  font-size: 13px;
  color: #94a3b8;
  border: 1px dashed #3f3d4a;
  border-radius: 6px;
  white-space: nowrap;
}

.mini-analyze-toolbar-stats {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #86efac;
  background: rgba(33, 115, 70, 0.2);
  border: 1px solid rgba(74, 222, 128, 0.28);
  border-radius: 8px;
  white-space: nowrap;
}

.mini-analyze-toolbar-footnote {
  margin: 0;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
}

.mini-analyze-sql-builder {
  margin-top: 8px;
  padding: 14px;
  border-radius: 10px;
}

.mini-analyze-sql-builder-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.mini-analyze-sql-builder-title {
  font-size: 14px;
  font-weight: 600;
  color: #d4d0dc;
}

.mini-analyze-sql-close {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #8b8698;
  cursor: pointer;
}

.mini-analyze-sql-close:hover {
  background: rgba(33, 115, 70, 0.28);
  color: #fff;
}

.mini-analyze-sql-label {
  display: block;
  font-size: 11px;
  color: #9ca3af;
  margin-bottom: 4px;
}

.mini-analyze-sql-textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 160px;
  padding: 10px 12px;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  border-radius: 8px;
}

.mini-analyze-sql-run {
  width: 100%;
  margin-top: 12px;
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  background: #217346;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mini-analyze-sql-run:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.mini-analyze-sql-help {
  font-size: 11px;
  color: #9ca3af;
  line-height: 1.45;
  padding: 10px;
  margin-bottom: 10px;
}

.mini-analyze-sql-help code {
  background: #12111a;
  color: #34d399;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 11px;
}

.mini-analyze-sql-token-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  margin-bottom: 8px;
  border-radius: 8px;
}

.spin,
.animate-spin {
  animation: miniSpin 0.9s linear infinite;
}

/* 三视图标题行「点击开始」 */
.view-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.view-start-action-btn {
  border: 1px solid #217346;
  background: rgba(33, 115, 70, 0.22);
  color: #bbf7d0;
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: all 0.2s ease;
}

.view-start-action-btn:hover {
  background: rgba(33, 115, 70, 0.34);
  border-color: #2ea65d;
}

/* 顶栏缩放（与主站 HeaderActionBar ZoomControl 一致；独立配色） */
.mini-header-zoom {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  background: #252525;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: #bdbdbd;
  user-select: none;
}

.mini-header-zoom-btn {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(74, 222, 128, 0.08);
  color: #e8e8e8;
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.mini-header-zoom-btn:hover {
  border-color: rgba(74, 222, 128, 0.45);
  background: rgba(74, 222, 128, 0.15);
}

.mini-header-zoom-slider {
  width: 120px;
  accent-color: #4ade80;
  cursor: pointer;
}

.mini-header-zoom-value {
  min-width: 52px;
  text-align: right;
  font-size: 13px;
  font-weight: 700;
  color: #e5e5e5;
}

/* AI 助手：与主站 excel-ai 暗色面板同款布局与类名 */
.ai-panel {
  background: #1c1b22;
  border-left: 1px solid #2e2c36;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  min-width: 300px;
  max-width: 42vw;
}

.ai-panel-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  flex-shrink: 0;
  background: #24222c;
  border-bottom: 1px solid #2e2c36;
}

.ai-panel-title-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.ai-panel-heading {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #86efac;
}

.ai-header-icon {
  flex-shrink: 0;
  color: #34d399;
}

.ai-panel-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ai-clear-replies-btn {
  font-size: 12px;
  padding: 6px 10px;
  cursor: pointer;
}

.ai-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #8b8698;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.ai-close-btn:hover {
  color: #ffffff;
  background: rgba(33, 115, 70, 0.28);
}

.ai-view-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #217346;
  color: #e9fff2;
  border: 1px solid rgba(74, 222, 128, 0.35);
}

.ai-view-badge--inline {
  margin-top: 0;
}

.large-file-indicator {
  border-bottom: 1px solid #2e2c36;
  padding: 8px 14px;
  background: #24222c;
}

.large-file-indicator .file-name {
  font-size: 13px;
  font-weight: 600;
  color: #86efac;
}

.large-file-indicator .file-info {
  font-size: 13px;
  color: #8b8698;
  margin-top: 4px;
}

.ai-panel-scroll-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px 16px;
  min-height: 0;
}

.ai-presets-block {
  margin-bottom: 4px;
}

.ai-dark-select {
  background: #1c1b22;
  border: 1px solid #2e2c36;
  color: #d4d0dc;
  border-radius: 6px;
}

.ai-dark-select:focus {
  border-color: #34d399;
  outline: none;
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.18);
}

.ai-dark-select:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ai-dark-select option {
  background: #1c1b22;
  color: #d4d0dc;
}

/* excel-ai 大文件「我要分析」：快捷分析操作 + 填写参数 */
.ai-quick-action {
  position: relative;
}

.ai-quick-action-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  cursor: pointer;
}

.ai-quick-action-trigger:disabled {
  cursor: not-allowed;
}

.ai-quick-action-trigger-text {
  flex: 1;
  text-align: left;
  font-size: 14px;
  color: #d4d0dc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-quick-action-chevron {
  flex-shrink: 0;
  color: #8b8698;
  transition: transform 0.2s ease;
}

.ai-quick-action-chevron.open {
  transform: rotate(180deg);
}

.ai-quick-action-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: min(560px, calc(100vh - 220px));
  overflow: auto;
  z-index: 30;
  padding: 6px;
  background: #1c1b22;
  border: 1px solid #2e2c36;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.ai-quick-action-header,
.ai-quick-action-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 6px;
  padding: 7px 8px;
  font-size: 14px;
}

.ai-quick-action-header {
  color: #86efac;
  font-weight: 600;
  border-bottom: 1px solid #2e2c36;
  margin-bottom: 4px;
}

.ai-quick-action-item {
  border: none;
  background: transparent;
  color: #d4d0dc;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.ai-quick-action-item:hover {
  background: rgba(33, 115, 70, 0.2);
}

.ai-large-quick-wrap {
  margin-bottom: 10px;
}

.ai-quick-form-section {
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 8px;
  font-size: 14px;
}

.ai-quick-form-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.ai-quick-form-field {
  margin-bottom: 12px;
}

.ai-quick-form-label {
  display: block;
  margin-bottom: 4px;
  color: #b3b3b3;
  font-size: 13px;
}

.ai-quick-form-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-quick-form-input {
  flex: 1;
  min-width: 0;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
  outline: none;
}

.ai-dark-input {
  background: #1c1b22;
  border: 1px solid #2e2c36;
  color: #d4d0dc;
}

.ai-dark-input:focus {
  border-color: #34d399;
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.18);
}

.ai-dark-section {
  background: rgba(22, 20, 28, 0.5);
  border: 1px solid #2e2c36;
}

.ai-footer-area {
  padding: 12px;
  border-top: 1px solid #2e2c36;
  background: #24222c;
  flex-shrink: 0;
}

.ai-footer-send-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 16px;
  min-height: 72px;
  background: linear-gradient(135deg, #217346, #2a9058);
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.15s ease;
}

.ai-footer-send-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #1a5c37, #217346);
}

.ai-footer-send-btn:disabled {
  background: #2e2c36;
  color: #5a5566;
  cursor: not-allowed;
}

.ai-footer-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.ai-footer-textarea {
  flex: 1;
  min-height: 60px;
  max-height: 140px;
  resize: vertical;
  background: #1c1b22;
  border: 1px solid #2e2c36;
  border-radius: 6px;
  padding: 10px 12px;
  color: #d4d0dc;
  font-size: 14px;
  outline: none;
}

.ai-footer-textarea:focus {
  border-color: #34d399;
}

.ai-footer-textarea::placeholder {
  color: #5a5566;
  font-size: 14px;
}

.ai-footer-textarea:disabled {
  background: #16141c;
  color: #5a5566;
}

.report-perspective-bar {
  margin-bottom: 10px;
}

.report-perspective-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
  color: #e5e5e5;
  margin-bottom: 8px;
}

.ai-perspective-icon {
  color: #34d399;
}

.report-perspective-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.report-perspective-chip {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #334155;
  background: rgba(15, 23, 42, 0.45);
  color: #cbd5e1;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.report-perspective-chip:hover {
  border-color: #34d399;
  color: #d1fae5;
  background: rgba(33, 115, 70, 0.22);
}

.pres-prompt-presets-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.pres-prompt-chip-mini {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #334155;
  background: rgba(15, 23, 42, 0.45);
  color: #cbd5e1;
  font-size: 12px;
  cursor: pointer;
  text-align: left;
  max-width: 100%;
}

.pres-prompt-chip-mini:hover {
  border-color: #34d399;
  color: #d1fae5;
}

.goal-presets-list {
  display: flex;
  flex-direction: column;
  padding: 10px 0;
  border: 1px solid #2e2c36;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(36, 34, 44, 0.95), rgba(28, 27, 34, 0.92));
}

.goal-presets-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px 6px;
  color: #d1fae5;
  font-size: 13px;
  font-weight: 600;
}

.goal-preset-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 14px;
  border: none;
  background: transparent;
  color: #d1d5db;
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.goal-preset-row:hover:not(:disabled) {
  background: rgba(33, 115, 70, 0.12);
  color: #f0fdf4;
}

.goal-preset-row:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.goal-preset-icon {
  flex-shrink: 0;
  color: #6b7280;
}

.goal-preset-row:hover:not(:disabled) .goal-preset-icon {
  color: #34d399;
}

.goal-preset-text {
  flex: 1;
  min-width: 0;
}

.goal-preset-arrow {
  flex-shrink: 0;
  color: #6b7280;
  transition: color 0.15s ease, transform 0.15s ease;
}

.goal-preset-row:hover:not(:disabled) .goal-preset-arrow {
  color: #34d399;
  transform: translateX(2px);
}

.goal-preset-row-group {
  display: flex;
  flex-direction: column;
}

.goal-preset-formula-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 14px 10px 39px;
  animation: gpFormulaSlide 0.15s ease-out;
}

@keyframes gpFormulaSlide {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.goal-preset-select {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #334155;
  border-radius: 6px;
  background-color: rgba(15, 23, 42, 0.6);
  color: #d1d5db;
  font-size: 12px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.goal-preset-select:focus {
  border-color: #34d399;
}

.goal-preset-select:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.goal-preset-select option {
  background: #1a1a2e;
  color: #d1d5db;
}

.goal-ai-suggest-wrap {
  margin: 10px 10px 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(251, 191, 36, 0.45);
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.38) 0%, rgba(30, 27, 40, 0.95) 55%, rgba(22, 20, 31, 0.98) 100%);
  box-shadow: 0 0 0 1px rgba(253, 224, 71, 0.12), 0 6px 22px rgba(0, 0, 0, 0.35);
}

.goal-ai-suggest-trigger {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  color: #fef3c7;
}

.goal-ai-suggest-trigger:hover:not(:disabled) {
  color: #fffbeb;
}

.goal-ai-suggest-trigger:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.goal-ai-suggest-icon {
  flex-shrink: 0;
  margin-top: 1px;
  color: #fbbf24;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.55));
}

.goal-ai-suggest-title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.goal-ai-suggest-spin {
  flex-shrink: 0;
  color: #fbbf24;
  animation: miniSpin 0.9s linear infinite;
}

.goal-ai-suggest-error {
  margin-top: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 12px;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.35);
}

.goal-ai-suggest-select {
  width: 100%;
  margin-top: 10px;
  padding: 7px 10px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 8px;
  background-color: rgba(15, 23, 42, 0.75);
  color: #fef9c3;
  font-size: 12px;
  outline: none;
  cursor: pointer;
}

.goal-ai-suggest-select:focus {
  border-color: #fbbf24;
}

.goal-ai-suggest-select option {
  background: #1a1523;
  color: #fef3c7;
}

.ai-assistant-markdown {
  word-break: break-word;
}

.ai-assistant-markdown p {
  margin: 0 0 0.5em;
}

.ai-assistant-markdown p:last-child {
  margin-bottom: 0;
}

.ai-assistant-markdown a {
  color: #6ee7b7;
  text-decoration: underline;
}

.ai-assistant-markdown code {
  background: #16141c;
  color: #86efac;
  padding: 1px 4px;
  border-radius: 4px;
  font-size: 12px;
}

.ai-assistant-markdown pre {
  background: #16141c;
  border: 1px solid #2e2c36;
  border-radius: 6px;
  padding: 8px;
  overflow-x: auto;
  font-size: 12px;
}

.ai-assistant-markdown pre code {
  background: transparent;
  padding: 0;
}

.ai-msg-mini {
  max-width: 94%;
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 13px;
  line-height: 1.55;
}

.ai-msg-mini.user {
  align-self: flex-end;
  background: rgba(33, 115, 70, 0.3);
  color: #dfffea;
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.ai-msg-mini.assistant {
  align-self: flex-start;
  background: #24222c;
  border: 1px solid #2e2c36;
  color: #e8e4f0;
}

.ai-msg-mini.error {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(220, 38, 38, 0.12);
  color: #fecaca;
}

.ai-messages-mini {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.report-completed-frame {
  flex: 1;
  min-height: 360px;
  border: none;
  width: 100%;
  background: #111;
}

.report-async-hint {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 8px;
}

.report-preview-partial {
  margin-top: 16px;
  max-height: 420px;
  overflow: auto;
}

.ui-history-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #d1d5db;
  cursor: pointer;
}

.ui-history-action-btn-danger {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.35);
}

.pres-preview-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid #2e2c36;
  background: #1a1a1a;
}

.pres-preview-toolbar button {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #2a2a2a;
  color: #e5e5e5;
  cursor: pointer;
  font-size: 13px;
}

.pres-preview-toolbar a {
  color: #86efac;
  font-size: 13px;
}
/* ============================================================================
 * "我要汇报" PPTX 模块样式
 * ============================================================================ */

/* ── 主容器 ────────────────────────────────────────────── */
.pres-view {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 12px 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── 首页 ──────────────────────────────────────────────── */
.pres-home {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.pres-home-hero {
  text-align: center;
  padding: 8px 20px 0;
}
.pres-home-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary, #e0e0e0);
  margin: 0 0 12px;
}
.pres-home-desc {
  font-size: 16px;
  color: var(--text-secondary, #999);
  margin: 0;
}
.pres-home-hint {
  font-size: 16px;
  color: var(--accent-primary, #4ECDC4);
  margin: 12px 0 0;
}

.pres-home .pres-history-panel {
  margin-top: 32px;
}

/* ── 模板画廊 ──────────────────────────────────────────── */
.pres-template-gallery {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.pres-section-title {
  font-size: 19px;
  font-weight: 600;
  color: var(--text-primary, #e0e0e0);
  text-align: center;
  margin: 0;
}
.pres-tpl-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
@media (max-width: 1200px) {
  .pres-tpl-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .pres-tpl-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── 模板卡片 ──────────────────────────────────────────── */
.pres-tpl-card {
  display: flex;
  flex-direction: column;
  border: 2px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-secondary, #1a1a1a);
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.pres-tpl-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}
.pres-tpl-card.selected {
  border-color: var(--accent-primary, #4ECDC4);
  box-shadow: 0 0 0 1px var(--accent-primary, #4ECDC4), 0 6px 20px rgba(78,205,196,0.2);
}

/* 预览区 */
.pres-tpl-preview {
  position: relative;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* 默认：灰度 + 略暗，hover/selected：恢复彩色 */
.pres-tpl-preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(100%) brightness(0.65);
  transition: filter 0.3s ease;
}
.pres-tpl-card:hover .pres-tpl-preview-image,
.pres-tpl-card.selected .pres-tpl-preview-image {
  filter: grayscale(0%) brightness(1);
}

/* 预览区遮罩：hover 时淡出，让图片更鲜活 */
.pres-tpl-preview::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.28);
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.pres-tpl-card:hover .pres-tpl-preview::after,
.pres-tpl-card.selected .pres-tpl-preview::after {
  opacity: 0;
}

.pres-tpl-accent-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  opacity: 0.5;
  transition: opacity 0.3s ease;
  z-index: 1;
}
.pres-tpl-card:hover .pres-tpl-accent-bar,
.pres-tpl-card.selected .pres-tpl-accent-bar {
  opacity: 1;
}

.pres-tpl-preview-icon {
  opacity: 0.45;
  transition: opacity 0.3s ease;
  filter: grayscale(100%);
}
.pres-tpl-card:hover .pres-tpl-preview-icon,
.pres-tpl-card.selected .pres-tpl-preview-icon {
  opacity: 0.9;
  filter: grayscale(0%);
}

/* 信息区 */
.pres-tpl-info {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.pres-tpl-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary, #999);
  transition: color 0.25s ease;
}
.pres-tpl-card:hover .pres-tpl-name,
.pres-tpl-card.selected .pres-tpl-name {
  color: var(--text-primary, #e0e0e0);
}
.pres-tpl-desc {
  font-size: 11px;
  color: var(--text-tertiary, #666);
  line-height: 1.4;
  transition: color 0.25s ease;
}
.pres-tpl-card:hover .pres-tpl-desc,
.pres-tpl-card.selected .pres-tpl-desc {
  color: var(--text-secondary, #999);
}

/* ── 自定义提示 ────────────────────────────────────────── */
.pres-custom-prompt {
  width: 100%;
}
.pres-prompt-divider {
  height: 1px;
  background: var(--border-primary, #333);
  margin: 24px 0 16px;
  width: 99%;
}
.pres-prompt-content-wrapper {
  max-width: none;
  margin: 0 auto;
  width: 100%;
}
.pres-prompt-panel {
  display: grid;
  grid-template-columns: minmax(0, calc(58% + 10px)) minmax(0, calc(42% - 10px));
  gap: 14px;
  align-items: stretch;
}
.pres-prompt-panel-left,
.pres-prompt-panel-right {
  background: rgba(20, 24, 31, 0.92);
  border: 1px solid var(--border-primary, #333);
  border-radius: 10px;
  padding: 12px;
}
.pres-prompt-panel-title {
  font-size: 14px;
  color: var(--text-secondary, #aaa);
  margin-bottom: 10px;
  font-weight: 600;
}
.pres-prompt-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0;
  align-content: flex-start;
  max-height: 176px;
  overflow: auto;
}
.pres-prompt-preset-item {
  padding: 6px 10px;
  background: var(--bg-tertiary, #2a2a2a);
  border: 1px solid var(--border-primary, #333);
  border-radius: 4px;
  font-size: 13px;
  color: var(--text-secondary, #aaa);
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  line-height: 1.35;
  flex: 1 1 calc(50% - 8px);
  max-width: calc(50% - 4px);
  min-height: 34px;
}
.pres-prompt-preset-item:hover {
  background: var(--bg-hover, #333);
  border-color: var(--accent-primary, #4ECDC4);
  color: var(--text-primary, #e0e0e0);
}
.pres-prompt-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary, #aaa);
  margin-bottom: 8px;
  display: block;
}
.pres-prompt-input {
  width: 100%;
  background: var(--bg-secondary, #1e1e1e);
  border: 1px solid var(--border-primary, #333);
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 15px;
  color: var(--text-primary, #e0e0e0);
  resize: vertical;
}
.pres-prompt-input::placeholder {
  font-size: 15px;
}
.pres-prompt-input:focus {
  border-color: var(--accent-primary, #4ECDC4);
  outline: none;
}

.pres-prompt-input-row {
  width: 100%;
}
.pres-prompt-input-row .pres-prompt-input {
  width: 100%;
  min-height: 140px;
  resize: none;
}
.pres-prompt-actions {
  margin-top: 10px;
  display: flex;
  justify-content: center;
}

.pres-generate-inline-btn {
  flex: 0 0 auto;
  min-width: 132px;
  padding: 10px 16px;
  align-self: stretch;
  justify-content: center;
}

@media (max-width: 760px) {
  .pres-prompt-panel {
    grid-template-columns: 1fr;
  }
  .pres-prompt-input-row {
    width: 100%;
  }
  .pres-prompt-presets {
    max-height: none;
  }
  .pres-generate-inline-btn {
    width: 100%;
  }
  .pres-prompt-actions {
    justify-content: center;
  }
}

/* ── 生成按钮 ──────────────────────────────────────────── */
.pres-generate-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}
.pres-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  background: var(--accent-primary, #4ECDC4);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.pres-btn-primary svg {
  color: currentColor;
}
.pres-btn-primary:hover { opacity: 0.9; }
.pres-btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.pres-btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--bg-tertiary, #2a2a2a);
  color: var(--text-primary, #ccc);
  border: 1px solid var(--border-primary, #333);
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
}
.pres-btn-sm:hover { background: var(--bg-hover, #333); }

/* 与“历史报表清单”刷新按钮视觉保持一致 */
.pres-history-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: linear-gradient(135deg, var(--accent-primary, #217346), #2A9058);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
}

.pres-history-refresh-btn:hover:not(:disabled) {
  box-shadow: 0 4px 12px rgba(33, 115, 70, 0.4);
}

.pres-history-refresh-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pres-btn-xs {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  background: transparent;
  color: var(--text-secondary, #999);
  border: 1px solid var(--border-primary, #333);
  border-radius: 3px;
  font-size: 11px;
  cursor: pointer;
}
.pres-btn-xs:hover { background: var(--bg-hover, #333); }
.pres-btn-danger { color: #e57373; border-color: #e5737366; }
.pres-btn-danger:hover { background: #e5737322; }

/* ── 生成进度 ──────────────────────────────────────────── */
.pres-generating {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 60px 20px;
}
.pres-spinner {
  animation: presSpinAnim 1s linear infinite;
}
@keyframes presSpinAnim {
  to { transform: rotate(360deg); }
}
.pres-generating-msg {
  font-size: 15px;
  color: var(--text-primary, #ccc);
}
.pres-progress-bar {
  width: 320px;
  height: 4px;
  background: var(--bg-tertiary, #2a2a2a);
  border-radius: 2px;
  overflow: hidden;
}
.pres-progress-fill {
  height: 100%;
  background: var(--accent-primary, #4ECDC4);
  transition: width 0.5s ease;
}

/* ── 预览布局 ──────────────────────────────────────────── */
.pres-preview-layout {
  display: flex;
  gap: 16px;
  height: 100%;
  min-height: 0;
}
.pres-thumb-panel {
  width: 160px;
  min-width: 160px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 8px;
}
.pres-thumb-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  background: none;
  border: 2px solid transparent;
  border-radius: 4px;
  padding: 4px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.pres-thumb-item.active {
  border-color: var(--accent-primary, #4ECDC4);
}
.pres-thumb-item:hover {
  border-color: var(--border-hover, #555);
}
.pres-thumb-number {
  font-size: 11px;
  color: var(--text-secondary, #888);
  min-width: 16px;
  text-align: right;
  padding-top: 2px;
}
.pres-thumb-card {
  flex: 1;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 2px;
}

/* ── 主舞台 ────────────────────────────────────────────── */
.pres-main-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

/* ── 幻灯片渲染 ────────────────────────────────────────── */
.pres-slide {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}
.pres-slide-mini {
  border-radius: 2px;
  font-size: 4px;
}
.pres-slide-content {
  flex: 1;
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
}
.pres-slide-mini .pres-slide-content {
  padding: 6px 8px;
}

/* ── 封面页 ────────────────────────────────────────────── */
.pres-slide-cover {
  justify-content: center;
  align-items: center;
  text-align: center;
}
.pres-cover-center {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pres-cover-title {
  font-size: 36px;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}
.pres-slide-mini .pres-cover-title { font-size: 8px; }
.pres-cover-subtitle {
  font-size: 16px;
  margin: 0;
}
.pres-slide-mini .pres-cover-subtitle { font-size: 5px; }
.pres-cover-accent-line {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  border-radius: 2px;
}
.pres-slide-mini .pres-cover-accent-line { display: none; }

/* ── 通用标题 ──────────────────────────────────────────── */
.pres-slide-heading {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 20px;
}
.pres-slide-mini .pres-slide-heading { font-size: 6px; margin-bottom: 4px; }
.pres-slide-subtitle {
  font-size: 14px;
  margin: 0 0 12px;
}

/* ── 目录页 ────────────────────────────────────────────── */
.pres-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pres-toc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
}
.pres-slide-mini .pres-toc-item { font-size: 5px; gap: 3px; }
.pres-toc-number {
  font-size: 20px;
  font-weight: 700;
  min-width: 32px;
}
.pres-slide-mini .pres-toc-number { font-size: 6px; min-width: 10px; }

/* ── KPI 页 ────────────────────────────────────────────── */
.pres-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 8px;
}
.pres-slide-mini .pres-kpi-grid {
  gap: 3px;
  grid-template-columns: repeat(auto-fit, minmax(30px, 1fr));
}
.pres-kpi-card {
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pres-slide-mini .pres-kpi-card { padding: 3px; border-radius: 2px; }
.pres-kpi-label { font-size: 12px; }
.pres-kpi-value { font-size: 28px; font-weight: 700; }
.pres-kpi-unit { font-size: 11px; }
.pres-slide-mini .pres-kpi-label { font-size: 3px; }
.pres-slide-mini .pres-kpi-value { font-size: 6px; }
.pres-slide-mini .pres-kpi-unit { font-size: 3px; }

/* ── 图表/表格占位 ────────────────────────────────────── */
.pres-chart-placeholder {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed;
  border-radius: 8px;
  font-size: 14px;
}
.pres-slide-mini .pres-chart-placeholder { font-size: 4px; border-radius: 2px; }
.pres-chart-mini-svg {
  width: 94%;
  height: 86%;
  display: block;
}
.pres-chart-preview-img {
  width: 96%;
  height: 92%;
  object-fit: contain;
  border-radius: 4px;
}
.pres-slide-stock-image-wrap {
  margin-top: 10px;
  width: 100%;
  display: flex;
  justify-content: flex-end;
}
.pres-slide-stock-image {
  width: 38%;
  max-height: 110px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.25);
}

/* ── 要点列表 ──────────────────────────────────────────── */
.pres-slide-bullets {
  list-style: disc;
  padding-left: 24px;
  margin: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}
.pres-slide-mini .pres-slide-bullets { font-size: 4px; gap: 2px; padding-left: 8px; }

/* ── 总结页 ────────────────────────────────────────────── */
.pres-summary-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pres-summary-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
}
.pres-slide-mini .pres-summary-list li { font-size: 4px; gap: 3px; }
.pres-summary-bullet {
  width: 8px;
  height: 8px;
  min-width: 8px;
  border-radius: 50%;
  margin-top: 5px;
}
.pres-slide-mini .pres-summary-bullet { width: 3px; height: 3px; min-width: 3px; margin-top: 1px; }

/* ── 表格页 ────────────────────────────────────────────── */
.pres-table-wrap {
  overflow: auto;
  flex: 1;
}
.pres-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.pres-data-table th,
.pres-data-table td {
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,0.1);
  text-align: left;
}
.pres-slide-mini .pres-data-table { font-size: 3px; }
.pres-slide-mini .pres-data-table th,
.pres-slide-mini .pres-data-table td { padding: 1px 2px; }

/* ── 编辑器布局 ────────────────────────────────────────── */
.pres-editor-layout {
  display: flex;
  gap: 16px;
  height: 100%;
}
.pres-editor-preview {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pres-editor-props {
  width: 280px;
  min-width: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  background: var(--bg-secondary, #1e1e1e);
  border-radius: 8px;
  border: 1px solid var(--border-primary, #333);
}
.pres-props-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary, #e0e0e0);
}
.pres-prop-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pres-prop-label {
  font-size: 13px;
  color: var(--text-secondary, #999);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pres-prop-input,
.pres-prop-select,
.pres-prop-textarea {
  width: 100%;
  padding: 6px 10px;
  background: var(--bg-tertiary, #2a2a2a);
  border: 1px solid var(--border-primary, #333);
  border-radius: 4px;
  color: var(--text-primary, #e0e0e0);
  font-size: 14px;
}
.pres-prop-input:focus,
.pres-prop-select:focus,
.pres-prop-textarea:focus {
  border-color: var(--accent-primary, #4ECDC4);
  outline: none;
}
.pres-bullet-row {
  display: flex;
  gap: 4px;
  align-items: center;
}
.pres-bullet-row .pres-prop-input {
  flex: 1;
}

/* ── 播放模式 ──────────────────────────────────────────── */
.pres-player-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: none;
}
.pres-player-stage {
  width: 100vw;
  height: 100vh;
}
.pres-player-stage .pres-slide {
  width: 100%;
  height: 100%;
  border-radius: 0;
}
.pres-player-progress {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,0.1);
  z-index: 10000;
}
.pres-player-progress-fill {
  height: 100%;
  background: var(--accent-primary, #4ECDC4);
  transition: width 0.3s ease;
}
.pres-player-page-indicator {
  position: fixed;
  bottom: 12px;
  right: 16px;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  z-index: 10000;
  cursor: default;
}
.pres-player-left-zone {
  position: fixed;
  left: 0;
  top: 0;
  width: 20%;
  height: 100%;
  z-index: 10001;
  cursor: pointer;
}

/* ── 历史面板 ──────────────────────────────────────────── */
.pres-history-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin: 24px auto 0;
  padding: 16px;
  background: var(--bg-secondary, #252525);
  border: 1px solid var(--border-primary, #333);
  border-radius: 12px;
}
.pres-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pres-history-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary, #e0e0e0);
  margin: 0;
}
.pres-history-refresh-link {
  margin-left: 8px;
  border: none;
  background: transparent;
  color: #93c5fd;
  font-size: 15px;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}
.pres-history-refresh-link:hover:not(:disabled) {
  text-decoration: underline;
}
.pres-history-refresh-link:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.pres-history-empty {
  font-size: 13px;
  color: var(--text-secondary, #888);
  text-align: center;
  padding: 20px;
}

/* 历史表与连接器/批量 Word / 报表共用 report-history-*，避免操作列挤压导致「打开」「删除」竖排 */
.pres-history-panel .report-history-table th:last-child,
.pres-history-panel .report-history-table td:last-child {
  white-space: nowrap;
  min-width: 168px;
  vertical-align: middle;
}
.pres-history-panel .ui-history-action-btn {
  flex-direction: row;
  flex-wrap: nowrap;
  white-space: nowrap;
  min-width: 72px;
}
.pres-history-panel .ui-history-action-btn span {
  white-space: nowrap;
}
.pres-history-panel .report-history-page-btn,
.pres-history-panel .report-history-page-info {
  font-size: 12px;
}

/* ── 空状态 ────────────────────────────────────────────── */
.pres-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-secondary, #888);
  font-size: 15px;
}

/* ── PPTist 编辑器全尺寸容器 ────────────────────────────── */
.pres-editor-fullsize {
  padding: 0 !important;
  margin: 0 !important;
  gap: 0 !important;
  overflow: hidden !important;
  height: 100% !important;
  min-height: 100% !important;
  display: block !important;
}

.pres-editor-fullsize .pptist-bridge-container {
  width: 99%;
  margin: 0 auto;
  height: 100%;
}
/* ============================================================
   报表系统 CSS — 深色模式 + 动画 + 响应式 + 专业排版
   ============================================================ */

/* ── 通用动画 ─────────────────────────────────── */
@keyframes reportFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes reportSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes reportPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.report-fade-in {
  animation: reportFadeIn 0.5s ease-out forwards;
}
.report-hidden {
  opacity: 0;
}

/* ── ReportView 容器 ──────────────────────────── */
.report-view {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
  background: var(--bg-primary, #1E1E1E);
  color: var(--text-primary, #E5E5E5);
  overflow: hidden;
}

/* 当report-view在content-placeholder-panel内时，移除外层padding对滚动条的影响 */
.content-placeholder-panel .report-view {
  margin: -40px !important;
  width: calc(100% + 80px) !important;
  height: calc(100% + 80px) !important;
}

/* ── 顶部工具栏 ──────────────────────────────── */
.report-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  background: var(--bg-secondary, #252525);
  border-bottom: 1px solid var(--border-primary, #333);
  flex-shrink: 0;
}
.report-back-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: 1px solid var(--border-primary, #444);
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary, #B3B3B3);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}
.report-back-btn:hover {
  background: var(--bg-tertiary, #2A2A2A);
  color: var(--text-primary, #E5E5E5);
}
.report-toolbar-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary, #E5E5E5);
  flex: 1;
}
.report-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.report-inline-notice {
  margin: 0 auto 16px;
  max-width: none;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #7f1d1d;
  border-radius: 8px;
  background: rgba(127, 29, 29, 0.18);
  color: #fecaca;
  font-size: 14px;
}
.report-empty-file-hint {
  width: 100%;
  margin: 0 auto;
  padding: 8px 0 4px;
  text-align: center;
}
.report-empty-file-title {
  margin: 0 0 12px;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary, #E5E5E5);
}
.report-empty-file-desc {
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--text-secondary, #B3B3B3);
}
.report-empty-file-note {
  margin: 0;
  font-size: 16px;
  color: var(--accent-primary, #4ECDC4);
}
.report-domain-quickbar {
  max-width: none;
  width: 100%;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.report-domain-quickbar-label {
  color: #94a3b8;
  font-size: 13px;
}
.report-domain-quick-btn {
  border: 1px solid #334155;
  background: rgba(15, 23, 42, 0.45);
  color: #cbd5e1;
  border-radius: 999px;
  font-size: 13px;
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.report-domain-quick-btn:hover:not(:disabled) {
  border-color: #60a5fa;
  color: #e2e8f0;
}
.report-domain-quick-btn.active {
  background: rgba(59, 130, 246, 0.2);
  border-color: #60a5fa;
  color: #bfdbfe;
}
.report-domain-quick-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.report-toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-primary, #444);
  background: var(--bg-tertiary, #2A2A2A);
  color: var(--text-secondary, #E5E5E5);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.report-toolbar-btn:hover:not(:disabled) {
  border-color: var(--accent-primary, #217346);
  background: #2f2f2f;
}
.report-toolbar-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.report-toolbar-btn-primary {
  background: rgba(33, 115, 70, 0.2);
  border-color: var(--accent-primary, #217346);
  color: #34D399;
}
.report-toolbar-btn-primary:hover:not(:disabled) {
  background: rgba(33, 115, 70, 0.35);
}

/* ── 主内容区 ─────────────────────────────────── */
.report-view .report-content {
  flex: 1;
  width: 100% !important;
  max-width: none !important;
  overflow-y: auto;
  padding: 12px 32px 16px 32px !important;
  padding-right: 0 !important;
}

.report-content-inner {
  width: 100%;
  margin: 0 auto;
  max-width: none;
  padding-right: 32px;
}

/* 强制主区域按 99% 展开（兜底旧样式/缓存覆盖） */
.report-view .report-inline-notice,
.report-view .report-domain-quickbar,
.report-view .report-template-stage,
.report-view .report-template-selector,
.report-view .report-history-panel,
.report-view .report-completed {
  width: 100% !important;
  max-width: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* ── 加载 / 错误状态 ─────────────────────────── */
.report-loading,
.report-generating,
.report-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 300px;
  color: var(--text-tertiary, #B3B3B3);
  font-size: 14px;
}
.report-progress-msg {
  animation: reportPulse 1.5s infinite;
}
.report-error { color: #F87171; }
.report-template-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 200px;
  color: var(--text-tertiary, #B3B3B3);
  font-size: 14px;
}
.report-retry-btn {
  padding: 8px 20px;
  background: var(--accent-primary, #217346);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}
.report-retry-btn:hover { opacity: 0.9; }

/* ── 模板选择器 ──────────────────────────────── */
.report-template-selector {
  max-width: none;
  width: 100%;
  margin: 0 auto;
  animation: reportFadeIn 0.4s ease-out;
}
.report-template-title {
  font-size: 20px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 24px;
  color: var(--text-primary, #FFFFFF);
}
.report-template-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.report-template-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 16px;
  background: var(--bg-secondary, #252525);
  border: 2px solid var(--border-primary, #333);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s;
  text-align: center;
}
.report-template-card:hover {
  border-color: var(--accent-primary, #217346);
  background: var(--bg-tertiary, #2A2A2A);
  transform: translateY(-2px);
}
.report-template-card.selected {
  border-color: var(--accent-primary, #217346);
  background: rgba(33, 115, 70, 0.12);
  box-shadow: 0 0 0 1px var(--accent-primary, #217346);
}
.report-template-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #000;
  font-size: 10px;
  font-weight: 600;
  border-radius: 4px;
}
.report-template-icon {
  color: var(--accent-primary, #34D399);
}
.report-template-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary, #E5E5E5);
}
.report-template-desc {
  font-size: 13px;
  color: var(--text-tertiary, #B3B3B3);
  line-height: 1.4;
}

/* ── 生成按钮 ─────────────────────────────────── */
.report-generate-actions {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}
.report-generate-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 40px;
  background: linear-gradient(135deg, var(--accent-primary, #217346), #2A9058);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
}
.report-generate-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(33, 115, 70, 0.4);
}
.report-generate-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── 历史报表首页 ─────────────────────────────── */
.report-history-panel {
  max-width: none;
  width: 100%;
  margin: 32px auto 0;
  background: var(--bg-secondary, #252525);
  border: 1px solid var(--border-primary, #333);
  border-radius: 12px;
  padding: 16px;
}
.report-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.report-history-header h3 {
  margin: 0;
  font-size: 17px;
  color: var(--text-primary, #E5E5E5);
}
.report-history-refresh-link {
  margin-left: 8px;
  border: none;
  background: transparent;
  color: #93c5fd;
  font-size: 15px;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}
.report-history-refresh-link:hover:not(:disabled) {
  text-decoration: underline;
}
.report-history-refresh-link:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.report-history-actions {
  display: flex;
  gap: 8px;
}
.report-history-refresh-btn,
.report-history-generate-btn {
  padding: 8px 12px;
  font-size: 14px;
}
.report-history-table-wrap {
  overflow: auto;
}
.report-history-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}
.report-history-table th,
.report-history-table td {
  border-bottom: 1px solid var(--border-primary, #333);
  padding: 10px 8px;
  text-align: left;
  font-size: 15px;
}
.report-history-table th {
  color: var(--text-tertiary, #B3B3B3);
  font-weight: 500;
}
.report-history-table td {
  color: var(--text-secondary, #E5E5E5);
}
.report-history-empty {
  text-align: center !important;
  color: var(--text-tertiary, #B3B3B3) !important;
  padding: 20px 0 !important;
}
.report-history-open-link {
  border: none;
  background: transparent;
  color: #93c5fd;
  padding: 0;
  cursor: pointer;
  text-align: left;
}
.report-history-open-link:hover:not(:disabled) {
  text-decoration: underline;
}
.report-history-open-link:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.report-history-row-actions {
  display: flex;
  gap: 8px;
}
.report-history-pagination {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.report-history-page-btn {
  border: 1px solid #334155;
  background: rgba(15, 23, 42, 0.45);
  color: #cbd5e1;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 13px;
  cursor: pointer;
}
.report-history-page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.report-history-page-info {
  font-size: 13px;
  color: #94a3b8;
}

/* ── ReportCanvas (报表画布) ─────────────────── */
.report-canvas {
  max-width: none;
  width: 100%;
  margin: 0 auto;
}
.report-canvas.report-canvas-export-light {
  background: #ffffff;
  color: #000000;
  border-radius: 8px;
}
.report-canvas-export-pdf {
  max-width: 1080px;
}
.report-canvas-export-pdf .report-canvas-header {
  padding: 18px 12px 12px;
}
.report-canvas-export-pdf .report-canvas-title {
  font-size: 22px;
}
.report-canvas-export-pdf .report-section {
  margin-bottom: 20px;
}
.report-canvas-export-pdf .report-charts-grid {
  grid-template-columns: 1fr;
  gap: 14px;
}
.report-canvas-export-pdf .report-chart-section {
  padding: 12px;
}
.report-canvas-export-pdf .report-kpi-grid {
  gap: 10px;
}
.report-canvas-export-pdf .report-kpi-card {
  padding: 14px;
}
.report-canvas-export-pdf .report-kpi-value {
  font-size: 24px;
}
.report-canvas-export-pdf .report-canvas-footer {
  margin-top: 14px;
  padding: 14px;
}
.report-canvas-export-light,
.report-canvas-export-light * {
  color: #000000 !important;
}
.report-canvas-export-light .report-hidden {
  opacity: 1 !important;
  transform: none !important;
}
.report-canvas-export-light .report-fade-in {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}
.report-canvas-export-light .report-export-static {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}
.report-canvas-export-light .report-canvas-title,
.report-canvas-export-light .report-insight-summary h3,
.report-canvas-export-light .report-insight-block h3,
.report-canvas-export-light .report-insight-paragraph h4,
.report-canvas-export-light .report-data-table-header h3,
.report-canvas-export-light .report-kpi-value {
  color: #000000 !important;
}
.report-canvas-export-light .report-canvas-meta,
.report-canvas-export-light .report-insight-summary p,
.report-canvas-export-light .report-insight-paragraph p,
.report-canvas-export-light .report-chart-insight-item,
.report-canvas-export-light .report-kpi-label,
.report-canvas-export-light .report-kpi-unit,
.report-canvas-export-light .report-canvas-footer,
.report-canvas-export-light .report-domain-evidence,
.report-canvas-export-light .report-data-table-toggle {
  color: #374151 !important;
}
.report-canvas-export-light .report-canvas-template {
  background: #e8f3ec !important;
  color: #000000 !important;
}
.report-canvas-export-light .report-domain-chip {
  border-color: #c7d2fe !important;
  background: #eef2ff !important;
  color: #000000 !important;
}
.report-canvas-export-light .report-kpi-card,
.report-canvas-export-light .report-chart-section,
.report-canvas-export-light .report-insight-section,
.report-canvas-export-light .report-data-table-section {
  background: #ffffff !important;
  border-color: #d1d5db !important;
  box-shadow: none !important;
}
.report-canvas-export-light .report-insight-item.report-finding {
  background: #eff6ff !important;
  border-left-color: #3b82f6 !important;
}
.report-canvas-export-light .report-insight-item.report-recommendation {
  background: #ecfdf5 !important;
  border-left-color: #10b981 !important;
}
.report-canvas-export-light .report-fallback-notice {
  border-color: rgba(217, 119, 6, 0.35) !important;
  background: rgba(251, 191, 36, 0.14) !important;
}
.report-canvas-export-light .report-fallback-title {
  color: #92400E !important;
}
.report-canvas-export-light .report-fallback-reason,
.report-canvas-export-light .report-fallback-detail,
.report-canvas-export-light .report-fallback-hint,
.report-canvas-export-light .report-fallback-btn {
  color: #1F2937 !important;
}
.report-canvas-export-light .report-data-table th {
  background: #f9fafb !important;
  color: #000000 !important;
  border-bottom: 1px solid #d1d5db !important;
}
.report-canvas-export-light .report-data-table td {
  color: #000000 !important;
  border-bottom: 1px solid #e5e7eb !important;
}
.report-canvas-export-light .report-data-table tr:hover td {
  background: #f9fafb !important;
}
.report-canvas-export-light .report-chart-insights {
  border-top-color: #d1d5db !important;
}
.report-canvas-export-light .report-canvas-footer {
  border-top-color: #d1d5db !important;
}
.report-canvas-header {
  text-align: center;
  padding: 32px 20px 24px;
  animation: reportSlideUp 0.5s ease-out;
}
.report-canvas-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary, #FFFFFF);
  margin: 0 0 8px;
}
.report-canvas-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 14px;
  color: var(--text-tertiary, #B3B3B3);
}
.report-canvas-template {
  padding: 2px 10px;
  background: rgba(52, 211, 153, 0.15);
  color: #34D399;
  border-radius: 4px;
  font-size: 13px;
}
.report-domain-context {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}
.report-domain-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.45);
  background: rgba(96, 165, 250, 0.12);
  color: #bfdbfe;
  font-size: 13px;
}
.report-domain-evidence {
  color: #94a3b8;
  font-size: 12px;
}

/* ── Sections ─────────────────────────────────── */
.report-section {
  margin-bottom: 48px;
}

/* ── KPI 卡片 ─────────────────────────────────── */
.report-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.report-kpi-card {
  padding: 20px;
  background: var(--bg-secondary, #252525);
  border: 1px solid var(--border-primary, #333);
  border-radius: 10px;
  text-align: center;
  animation: reportSlideUp 0.5s ease-out both;
  transition: transform 0.2s, box-shadow 0.2s;
}
.report-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.report-kpi-label {
  font-size: 13px;
  color: var(--text-tertiary, #B3B3B3);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.report-kpi-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary, #FFFFFF);
  font-variant-numeric: tabular-nums;
}
.report-kpi-unit {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-tertiary, #B3B3B3);
  margin-left: 4px;
}

/* ── 图表区域 ─────────────────────────────────── */
.report-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.report-chart-section {
  background: var(--bg-secondary, #252525);
  border: 1px solid var(--border-primary, #333);
  border-radius: 10px;
  padding: 16px;
  animation: reportFadeIn 0.5s ease-out both;
}
.report-chart-insights {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(148, 163, 184, 0.25);
}
.report-chart-insight-item {
  margin: 6px 0;
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1.75;
}

/* ── AI 洞察 ──────────────────────────────────── */
.report-insight-section {
  background: var(--bg-secondary, #252525);
  border: 1px solid var(--border-primary, #333);
  border-radius: 10px;
  padding: 28px;
}
.report-fallback-notice {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid rgba(250, 204, 21, 0.4);
  background: rgba(250, 204, 21, 0.08);
}
.report-fallback-title {
  font-size: 15px;
  font-weight: 600;
  color: #FDE68A;
  margin-bottom: 8px;
}
.report-fallback-reason,
.report-fallback-detail,
.report-fallback-hint {
  margin: 6px 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary, #E5E5E5);
}
.report-fallback-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}
.report-fallback-btn {
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: transparent;
  color: var(--text-secondary, #E5E5E5);
  border-radius: 6px;
  font-size: 13px;
  padding: 6px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.report-fallback-btn:hover {
  border-color: rgba(250, 204, 21, 0.8);
  color: #FDE68A;
}
.report-fallback-btn-primary {
  border-color: rgba(250, 204, 21, 0.8);
  background: rgba(250, 204, 21, 0.18);
  color: #FDE68A;
}
.report-insight-summary {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-primary, #333);
}
.report-insight-summary h3,
.report-insight-block h3 {
  font-size: 19px;
  font-weight: 600;
  color: var(--text-primary, #FFFFFF);
  margin: 0 0 10px;
}
.report-insight-summary p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-secondary, #E5E5E5);
  margin: 0;
}
.report-insight-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.report-insight-item {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-secondary, #E5E5E5);
}
.report-insight-item.report-finding {
  background: rgba(96, 165, 250, 0.08);
  border-left: 3px solid #60A5FA;
}
.report-insight-item.report-recommendation {
  background: rgba(52, 211, 153, 0.08);
  border-left: 3px solid #34D399;
}
.report-insight-block {
  margin-bottom: 20px;
}
.report-insight-details {
  margin-bottom: 20px;
}
.report-insight-paragraph {
  margin-bottom: 16px;
}
.report-insight-paragraph h4 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary, #FFFFFF);
  margin: 0 0 6px;
}
.report-insight-paragraph p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-secondary, #E5E5E5);
  margin: 0;
}

/* ── 数据表格 ─────────────────────────────────── */
.report-data-table-section {
  background: var(--bg-secondary, #252525);
  border: 1px solid var(--border-primary, #333);
  border-radius: 10px;
  overflow: hidden;
}
.report-data-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-primary, #333);
}
.report-data-table-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary, #FFFFFF);
  margin: 0;
}
.report-data-table-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text-tertiary, #B3B3B3);
}
.report-data-table-wrapper {
  overflow-x: auto;
}
.report-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.report-data-table th {
  padding: 10px 14px;
  text-align: left;
  background: var(--bg-tertiary, #2A2A2A);
  color: var(--text-secondary, #E5E5E5);
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 1px solid var(--border-primary, #333);
}
.report-data-table td {
  padding: 8px 14px;
  color: var(--text-secondary, #E5E5E5);
  border-bottom: 1px solid rgba(51, 51, 51, 0.5);
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.report-data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* ── 导出工具栏 ──────────────────────────────── */
.report-export-bar {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.report-export-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border-primary, #444);
  background: var(--bg-tertiary, #2A2A2A);
  color: var(--text-secondary, #E5E5E5);
  transition: all 0.2s;
}
.report-export-btn:hover:not(:disabled) {
  background: var(--bg-secondary, #252525);
  border-color: var(--accent-primary, #217346);
}
.report-export-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.report-export-share {
  background: rgba(52, 211, 153, 0.1);
  border-color: #34D399;
  color: #34D399;
}
.report-export-share:hover:not(:disabled) {
  background: rgba(52, 211, 153, 0.2);
}

/* ── 分享对话框 ──────────────────────────────── */
.report-share-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: reportFadeIn 0.2s ease-out;
}
.report-share-dialog {
  background: var(--bg-secondary, #252525);
  border: 1px solid var(--border-primary, #444);
  border-radius: 12px;
  width: 480px;
  max-width: 90vw;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.report-share-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-primary, #333);
  color: var(--text-primary, #FFFFFF);
}
.report-share-header h3 {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  margin: 0;
}
.report-share-close {
  background: none;
  border: none;
  color: var(--text-tertiary, #B3B3B3);
  cursor: pointer;
  padding: 4px;
}
.report-share-body {
  padding: 20px;
}
.report-share-hint {
  font-size: 13px;
  color: var(--text-tertiary, #B3B3B3);
  margin: 0 0 12px;
}
.report-share-url-row {
  display: flex;
  gap: 8px;
}
.report-share-url-input {
  flex: 1;
  padding: 8px 12px;
  background: var(--bg-tertiary, #2A2A2A);
  border: 1px solid var(--border-primary, #444);
  border-radius: 6px;
  color: var(--text-primary, #E5E5E5);
  font-size: 12px;
  outline: none;
}
.report-share-copy-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  background: var(--accent-primary, #217346);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.report-share-copy-btn:hover {
  opacity: 0.9;
}

/* ── 页脚 ─────────────────────────────────────── */
.report-canvas-footer {
  text-align: center;
  padding: 24px;
  font-size: 11px;
  color: var(--text-tertiary, #666);
  border-top: 1px solid var(--border-primary, #333);
  margin-top: 32px;
}

/* ── 分享页面（独立布局） ────────────────────── */
.share-report-page {
  height: 100vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg-primary, #1E1E1E);
  color: var(--text-primary, #E5E5E5);
  padding: 24px;
}
.share-report-container {
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 28px;
}
.share-report-loading,
.share-report-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 16px;
}
.share-report-error h2 { color: #F87171; }
.share-report-badge {
  text-align: center;
  margin-top: 32px;
  font-size: 11px;
  color: var(--text-tertiary, #666);
}
.share-report-backtop {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.5);
  background: rgba(15, 23, 42, 0.9);
  color: #34d399;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  z-index: 30;
}
.share-report-backtop:hover {
  background: rgba(30, 41, 59, 0.95);
}

/* ── 响应式布局 ──────────────────────────────── */
@media (max-width: 1024px) {
  .report-template-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .report-charts-grid {
    grid-template-columns: 1fr;
  }
  .report-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .report-content {
    padding: 16px;
  }
  .report-kpi-grid {
    grid-template-columns: 1fr;
  }
  .report-canvas-title {
    font-size: 20px;
  }
  .report-kpi-value {
    font-size: 22px;
  }
  .report-template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .report-toolbar {
    flex-wrap: wrap;
    gap: 8px;
  }
  .report-toolbar-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .report-export-bar {
    width: 100%;
    justify-content: flex-end;
  }
  .share-report-page {
    padding: 12px;
  }
  .report-insight-section {
    padding: 16px;
  }
  .report-chart-section {
    padding: 10px;
  }
  .report-chart-insight-item {
    font-size: 15px;
  }
  .report-insight-summary h3,
  .report-insight-block h3 {
    font-size: 17px;
  }
  .report-insight-summary p {
    font-size: 15px;
  }
  .report-insight-item {
    font-size: 15px;
  }
  .report-insight-paragraph h4 {
    font-size: 16px;
  }
  .report-insight-paragraph p {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .report-template-grid {
    grid-template-columns: 1fr;
  }
  .report-export-bar {
    flex-wrap: wrap;
  }
  .report-canvas-header {
    padding: 16px 12px;
  }
}
