/* çéæºè½ - å±ç¤ºçæ ·å¼ */
/* æ éç¢ï¼å±å¹éè¯»å¨ä¸ç¨ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ç¦ç¹å¯è§æ§ */
*:focus-visible {
  outline: 2px solid var(--color-primary, #C70039);
  outline-offset: 2px;
}

:root {
  --color-bg: #FFFFFF;
  --color-surface: #FFFFFF;
  --color-surface-secondary: #FAFBFC;
  --color-border: #E3E6EA;
  --color-border-light: #EFEFF3;
  --color-text-primary: #14161A;
  --color-text-secondary: #33384A;
  --color-text-tertiary: #656B77;
  --color-primary: #C70039;
  --color-primary-hover: #A3002F;
  --color-primary-light: #FDEFF3;
  --color-success: #00b42a;
  --color-warning: #ff7d00;
  --color-danger: #f53f3f;
  --color-purple: #581845;
  --color-teal: #14c9c9;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue",
    "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  color: var(--color-text-primary);
  background: var(--color-bg);
  line-height: 1.6;
}

/* é¡¶é¨å¯¼èª */
.top-nav {
  height: 56px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
}

.logo-icon {
  width: 28px;
  height: 28px;
  background-image: url('logo-xuanjing.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 6px;
}

.logo-text {
  background: linear-gradient(135deg, #C70039, #581845);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.seven-steps {
  display: flex;
  gap: 4px;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  color: var(--color-text-tertiary);
  transition: all 0.2s;
}

.step-item:hover {
  background: var(--color-surface-secondary);
}

.step-item.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 500;
}

.step-item.done {
  color: var(--color-success);
}

.step-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-surface-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
}

.step-item.active .step-num {
  background: var(--color-primary);
  color: white;
}

.step-item.done .step-num {
  background: var(--color-success);
  color: white;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.project-selector {
  display: flex;
  gap: 8px;
  align-items: center;
}

.project-selector select {
  padding: 6px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--color-surface);
  cursor: pointer;
  min-width: 140px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #C70039, #581845);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.user-name {
  font-size: 13px;
  color: var(--color-text-secondary);
}

/* ä¸»ä½å¸å± */
.main-container {
  display: flex;
  height: calc(100vh - 56px);
}

/* å·¦ä¾§è¾¹æ  */
.sidebar {
  width: 200px;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border-light);
  overflow-y: auto;
  flex-shrink: 0;
}

.sidebar-section {
  padding: 16px 0;
}

.sidebar-title {
  padding: 0 16px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-text-small {
  font-size: 11px;
  color: var(--color-primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  text-transform: none;
  letter-spacing: 0;
}
.btn-text-small:hover {
  text-decoration: underline;
}

.history-list {
  max-height: 500px;
  overflow-y: auto;
  padding: 0 8px;
}
.history-item {
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  margin-bottom: 2px;
  border-left: 3px solid transparent;
}
.history-item:hover {
  background: var(--color-surface-secondary);
}
.history-item .h-tool {
  font-weight: 500;
  color: var(--color-text-primary);
}
.history-item .h-time {
  color: var(--color-text-tertiary);
  font-size: 11px;
  margin-top: 2px;
}
.history-item .h-step {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 10px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  margin-top: 4px;
}
.history-empty {
  padding: 20px;
  text-align: center;
  color: var(--color-text-tertiary);
  font-size: 12px;
}

.tool-list {
  display: flex;
  flex-direction: column;
}

.tool-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 13px;
  color: var(--color-text-secondary);
  border-left: 3px solid transparent;
  transition: all 0.15s;
}

.tool-item:hover {
  background: var(--color-surface-secondary);
  color: var(--color-text-primary);
}

.tool-item.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-left-color: var(--color-primary);
  font-weight: 500;
}

.tool-item.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.tool-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.tool-badge-small {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--color-success);
  color: white;
  margin-left: auto;
}

.tool-badge-small.premium {
  background: var(--color-warning);
}

.tool-badge-small.locked {
  background: var(--color-text-tertiary);
}

/* åå®¹åº */
.content-area {
  flex: 1;
  display: flex;
  gap: 0;
  overflow: hidden;
}

/* AIå¯¹è¯é¢æ¿ */
.ai-panel {
  width: 360px;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border-light);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.ai-panel-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
}

.ai-avatar {
  width: 24px;
  height: 24px;
  background: #fff url('logo-xuanjing.png') center/contain no-repeat;
  border-radius: 6px;
}

.ai-badge {
  font-size: 10px;
  padding: 2px 8px;
  background: linear-gradient(135deg, #C70039, #581845);
  color: white;
  border-radius: 10px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-message {
  display: flex;
  gap: 8px;
  max-width: 100%;
}

.chat-message.user {
  flex-direction: row-reverse;
}

.chat-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
}

.chat-avatar.ai {
  background: #fff url('logo-xuanjing.png') center/contain no-repeat;
  border-radius: 6px;
  font-size: 0;
}

.chat-avatar.user {
  background: linear-gradient(135deg, #C70039, #581845);
  color: white;
}

.chat-bubble {
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
  word-break: break-word;
  max-width: calc(100% - 40px);
}

.chat-message.ai .chat-bubble {
  background: var(--color-surface-secondary);
  color: var(--color-text-primary);
  border-top-left-radius: 4px;
}

.chat-message.user .chat-bubble {
  background: var(--color-primary);
  color: white;
  border-top-right-radius: 4px;
}

.chat-input-area {
  padding: 12px;
  border-top: 1px solid var(--color-border-light);
  display: flex;
  gap: 8px;
}

.chat-input-area input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.chat-input-area input:focus {
  border-color: var(--color-primary);
}

.chat-input-area button {
  padding: 8px 16px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
}

.chat-input-area button:hover {
  background: var(--color-primary-hover);
}

/* å·¥å·é¢æ¿ */
.tool-panel {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
}

.tool-panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.tool-panel-header h2 {
  font-size: 20px;
  font-weight: 600;
}

.tool-badge {
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 12px;
  background: var(--color-success);
  color: white;
  font-weight: 500;
}

/* æ­¥éª¤å¯¼èª */
.tool-steps {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border-light);
}

.tool-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  color: var(--color-text-tertiary);
  background: var(--color-surface-secondary);
  transition: all 0.2s;
}

.tool-step:hover {
  color: var(--color-text-secondary);
}

.tool-step.active {
  background: var(--color-primary);
  color: white;
}

.step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-tertiary);
}

.tool-step.active .step-num {
  background: rgba(255, 255, 255, 0.25);
  color: white;
}

/* ä¸ä¼ åº */
.upload-area {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--color-surface);
}

.upload-area:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.upload-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.upload-text {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 4px;
}

.upload-hint {
  font-size: 12px;
  color: var(--color-text-tertiary);
}

.file-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--color-primary-light);
  border-radius: var(--radius-md);
  margin-top: 12px;
  font-size: 13px;
}

.data-preview-table-wrapper {
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.data-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.data-preview-table th {
  position: sticky;
  top: 0;
  background: var(--color-bg-secondary);
  padding: 8px 12px;
  text-align: left;
  font-weight: 500;
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.data-preview-table td {
  padding: 6px 12px;
  border-bottom: 1px solid var(--color-border-light);
  color: var(--color-text-primary);
  white-space: nowrap;
}

.data-preview-table tr:hover {
  background: var(--color-bg-hover);
}

.data-preview-table tr:last-child td {
  border-bottom: none;
}

.demo-data-section {
  margin-top: 32px;
}

.section-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: 12px;
}

.demo-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* åæ°è¡¨å */
.params-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.form-label .required {
  color: var(--color-danger);
  margin-left: 2px;
}

.form-input, .form-select {
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
  background: var(--color-surface);
}

.form-input:focus, .form-select:focus {
  border-color: var(--color-primary);
}

.form-hint {
  font-size: 12px;
  color: var(--color-text-tertiary);
}

/* æé® */
.action-bar {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 16px;
  border-top: 1px solid var(--color-border-light);
}

.btn-primary, .btn-secondary, .btn-text {
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-weight: 500;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--color-primary-hover);
}

.btn-primary:disabled {
  background: var(--color-text-tertiary);
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--color-surface-secondary);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  color: var(--color-text-primary);
  border-color: var(--color-text-tertiary);
}

.btn-text {
  background: none;
  color: var(--color-primary);
  padding: 4px 8px;
}

.btn-text:hover {
  text-decoration: underline;
}

/* ç»æå±ç¤º */
.result-loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--color-text-secondary);
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--color-border-light);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.result-chart {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
  text-align: center;
}

.result-chart img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.result-metrics {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
}

.result-metrics h3, .result-text h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--color-text-primary);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.metric-item {
  padding: 12px;
  background: var(--color-surface-secondary);
  border-radius: var(--radius-sm);
}

.metric-label {
  font-size: 12px;
  color: var(--color-text-tertiary);
  margin-bottom: 4px;
}

.metric-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
}

.metric-value.success {
  color: var(--color-success);
}

.metric-value.warning {
  color: var(--color-warning);
}

.result-text {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
}

.result-text pre {
  font-family: inherit;
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-wrap;
  color: var(--color-text-secondary);
}

/* å¼¹çª */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 400px;
  box-shadow: var(--shadow-lg);
}

.modal-content h3 {
  font-size: 16px;
  margin-bottom: 16px;
}

.modal-content input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 20px;
  outline: none;
}

.modal-content input:focus {
  border-color: var(--color-primary);
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* æ»å¨æ¡ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 3px;
}

/* ============================================================
   ç¨æ·èå
   ============================================================ */
.user-info {
  position: relative;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.2s;
}

.user-info:hover {
  background: var(--color-bg-tertiary);
}

.user-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  padding: 6px;
  z-index: 1000;
  display: none;
}

.user-menu.show {
  display: block;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--color-text-secondary);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.menu-item:hover {
  background: var(--color-bg-secondary);
  color: var(--color-text-primary);
}

.menu-icon {
  width: 16px;
  text-align: center;
  color: var(--color-primary);
  font-size: 12px;
}

.menu-divider {
  height: 1px;
  background: var(--color-border-light);
  margin: 4px 6px;
}

/* ============================================================
   å¼¹çªéç¨
   ============================================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.modal-content {
  background: white;
  border-radius: 12px;
  max-height: 90vh;
  overflow: auto;
  position: relative;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--color-border-light);
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--color-text-tertiary);
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

.modal-close:hover {
  color: var(--color-text-primary);
}

/* ============================================================
   ä¼åä¸­å¿å¼¹çª
   ============================================================ */
.member-modal {
  width: 100%;
  max-width: 780px;
}

.member-content {
  padding: 24px;
}

.member-card {
  background: linear-gradient(135deg, #C70039 0%, #581845 100%);
  border-radius: 12px;
  padding: 24px;
  color: white;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}

.member-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
}

.member-plan-badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(255,255,255,0.25);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
}

.member-usage {
  position: relative;
  z-index: 1;
}

.usage-item {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 8px;
}

.usage-label { opacity: 0.85; }
.usage-value { font-weight: 600; }

.usage-bar {
  height: 6px;
  background: rgba(255,255,255,0.25);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 18px;
}

.usage-bar-fill {
  height: 100%;
  background: white;
  border-radius: 3px;
  transition: width 0.3s;
}

.btn-upgrade {
  background: white;
  color: var(--color-primary);
  border: none;
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-upgrade:hover { opacity: 0.9; }
.btn-upgrade:disabled { opacity: 0.7; cursor: default; }

/* å¥é¤åè¡¨ */
.plans-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.plan-card {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 16px 14px;
  text-align: center;
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.plan-card:hover {
  border-color: var(--color-primary);
}

.plan-card.highlight {
  border-color: var(--color-primary);
  box-shadow: 0 2px 12px rgba(22,93,255,0.12);
}

.plan-card.current {
  border-color: var(--color-success);
}

.plan-tag {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: white;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 8px;
  font-weight: 500;
}

.plan-tag.current-tag {
  background: var(--color-success);
}

.plan-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-text-primary);
}

.plan-price {
  margin-bottom: 4px;
  color: var(--color-text-primary);
}

.price-symbol { font-size: 13px; }
.price-num { font-size: 22px; font-weight: 700; }
.price-unit { font-size: 12px; color: var(--color-text-tertiary); }

.plan-year {
  font-size: 11px;
  color: var(--color-text-tertiary);
  margin-bottom: 12px;
}

.plan-features {
  list-style: none;
  text-align: left;
  font-size: 11px;
  color: var(--color-text-secondary);
  margin-bottom: 14px;
  min-height: 80px;
}

.plan-features li {
  padding: 3px 0;
  padding-left: 14px;
  position: relative;
}

.plan-features li::before {
  content: 'â';
  position: absolute;
  left: 0;
  color: var(--color-success);
  font-weight: 600;
}

.plan-btn {
  width: 100%;
  padding: 7px 0;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: var(--color-primary);
  color: white;
  transition: background 0.2s;
}

.plan-btn:hover {
  background: var(--color-primary-hover);
}

.plan-btn.btn-current {
  background: var(--color-bg-secondary);
  color: var(--color-text-tertiary);
  cursor: default;
}

.plans-tip {
  text-align: center;
  font-size: 12px;
  color: var(--color-text-tertiary);
  padding-top: 12px;
  border-top: 1px solid var(--color-border-light);
}

/* ============================================================
   ä»è´¹å¢å¼¹çª
   ============================================================ */
.paywall-modal {
  width: 100%;
  max-width: 420px;
  padding: 40px 32px 32px;
  text-align: center;
}

.paywall-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.paywall-modal h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.paywall-modal > p {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: 24px;
}

.paywall-features {
  background: var(--color-bg-secondary);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 24px;
  text-align: left;
}

.pw-feat {
  padding: 4px 0;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.paywall-actions {
  display: flex;
  gap: 12px;
}

.paywall-actions .btn-secondary,
.paywall-actions .btn-primary {
  flex: 1;
  padding: 10px 0;
  font-size: 14px;
}

.btn-secondary {
  background: var(--color-bg-secondary);
  color: var(--color-text-secondary);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: var(--color-bg-tertiary);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-tertiary);
}

/* ============================================================
   æä»¶é©±å¨æ¨¡å¼ â æ°å¢æ ·å¼
   ============================================================ */

/* é¡¶æ ç®åï¼nav-center ä¸åéè¦ï¼æ 7æ­¥å¯¼èªï¼ */
.nav-center {
  display: none;
}

/* å°æé® */
.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

/* ä¾§è¾¹æ ï¼æ°å»ºåææé® */
.sidebar-new-analysis {
  padding: 12px;
}

.btn-new-analysis {
  width: 100%;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 8px;
  font-weight: 500;
}

.new-analysis-icon {
  font-size: 14px;
}

/* åéçº¿ */
.sidebar-divider {
  height: 1px;
  background: var(--color-border-light);
  margin: 0 12px;
}

/* å¯æå  section æ é¢ */
.sidebar-title.collapsible {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px 8px;
}

.section-caret {
  font-size: 8px;
  color: var(--color-text-tertiary);
  transition: transform 0.2s;
  width: 12px;
  display: inline-block;
  text-align: center;
}

.sidebar-section.collapsed .section-caret {
  transform: rotate(-90deg);
}

.sidebar-section.collapsed .file-list,
.sidebar-section.collapsed .report-tree,
.sidebar-section.collapsed .report-actions,
.sidebar-section.collapsed .load-more {
  display: none;
}

.section-count {
  margin-left: auto;
  font-size: 11px;
  color: var(--color-text-tertiary);
  background: var(--color-surface-secondary);
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 400;
}

/* æä»¶åè¡¨é¡¹ */
.file-list {
  padding: 0 8px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--color-text-secondary);
  border-left: 3px solid transparent;
  transition: all 0.15s;
  margin-bottom: 2px;
  position: relative;
}

.file-item:hover {
  background: var(--color-surface-secondary);
  color: var(--color-text-primary);
}

.file-item.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-left-color: var(--color-primary);
  font-weight: 500;
}

.file-item-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.file-item-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.file-item-time {
  font-size: 10px;
  color: var(--color-text-tertiary);
  flex-shrink: 0;
}

.file-item-actions {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  gap: 2px;
}

.file-item:hover .file-item-actions {
  display: flex;
}

.file-action-btn {
  background: none;
  border: none;
  font-size: 11px;
  padding: 2px 4px;
  cursor: pointer;
  color: var(--color-text-tertiary);
  border-radius: 3px;
}

.file-action-btn:hover {
  background: rgba(0,0,0,0.08);
  color: var(--color-text-primary);
}

.load-more {
  text-align: center;
  padding: 6px 0;
  font-size: 11px;
  color: var(--color-primary);
  cursor: pointer;
  border-top: 1px solid var(--color-border-light);
  margin: 4px 8px 0;
}

.load-more:hover {
  text-decoration: underline;
}

/* æ¥åæ  */
.report-tree {
  padding: 0 8px 8px;
}

.report-section {
  margin-bottom: 2px;
}

.report-section-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-secondary);
  border-radius: 4px;
  cursor: pointer;
}

.report-section-header:hover {
  background: var(--color-surface-secondary);
}

.report-section-caret {
  font-size: 8px;
  color: var(--color-text-tertiary);
  width: 10px;
  text-align: center;
  transition: transform 0.2s;
}

.report-section.collapsed .report-section-caret {
  transform: rotate(-90deg);
}

.report-section.collapsed .report-section-files {
  display: none;
}

.report-section-name {
  flex: 1;
}

.report-section-count {
  font-size: 10px;
  color: var(--color-text-tertiary);
  background: var(--color-surface-secondary);
  padding: 0 5px;
  border-radius: 8px;
}

.report-section-files {
  padding-left: 16px;
}

.report-file-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  font-size: 11px;
  color: var(--color-text-tertiary);
  border-radius: 4px;
  cursor: pointer;
}

.report-file-item:hover {
  background: var(--color-surface-secondary);
  color: var(--color-text-secondary);
}

.report-file-icon {
  font-size: 12px;
}

.report-file-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-actions {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  border-top: 1px solid var(--color-border-light);
}

.report-actions .btn-sm {
  flex: 1;
}

/* å·¥å·é¢æ¿å¤´é¨ â æä»¶åå¯ç¼è¾ */
.tool-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.tool-icon-large {
  font-size: 22px;
  flex-shrink: 0;
}

.file-name-input {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-primary);
  background: transparent;
  border: 1px solid transparent;
  padding: 4px 8px;
  border-radius: 4px;
  outline: none;
  flex: 1;
  max-width: 400px;
  transition: all 0.15s;
}

.file-name-input:hover {
  background: var(--color-surface-secondary);
}

.file-name-input:focus {
  border-color: var(--color-primary);
  background: var(--color-surface);
}

.tool-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* å å¥æ¥åä¸æèå */
.join-report-wrapper {
  position: relative;
}

.join-report-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  padding: 6px;
  z-index: 100;
}

.join-report-title {
  font-size: 11px;
  color: var(--color-text-tertiary);
  padding: 6px 10px 4px;
  font-weight: 500;
}

.join-report-options {
  max-height: 280px;
  overflow-y: auto;
}

.join-report-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  font-size: 12px;
  color: var(--color-text-secondary);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
}

.join-report-option:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.join-report-option .jr-step {
  font-weight: 600;
  color: var(--color-text-tertiary);
  font-size: 11px;
}

/* æ°å»ºåæå¼¹çª */
.new-analysis-modal {
  width: 100%;
  max-width: 720px;
  max-height: 85vh;
  padding: 0;
}

.new-analysis-search {
  padding: 16px 24px 0;
}

.new-analysis-search input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.new-analysis-search input:focus {
  border-color: var(--color-primary);
}

.new-analysis-groups {
  padding: 16px 24px 24px;
  overflow-y: auto;
  max-height: calc(85vh - 120px);
}

.tool-group {
  margin-bottom: 20px;
}

.tool-group-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 10px;
  padding-left: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tool-group-count {
  font-size: 11px;
  font-weight: 400;
  color: var(--color-text-tertiary);
  background: var(--color-surface-secondary);
  padding: 1px 7px;
  border-radius: 10px;
}

.tool-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.tool-card {
  border: 1px solid var(--color-border-light);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.tool-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 2px 12px rgba(22,93,255,0.12);
  transform: translateY(-1px);
}

.tool-card.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.tool-card-icon {
  font-size: 22px;
  margin-bottom: 2px;
}

.tool-card-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: 1.3;
}

.tool-card-desc {
  font-size: 11px;
  color: var(--color-text-tertiary);
  line-height: 1.4;
  flex: 1;
}

.tool-card-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 8px;
  background: var(--color-success);
  color: white;
  font-weight: 500;
}

.tool-card-badge.premium {
  background: var(--color-warning);
}

.tool-card-empty {
  grid-column: 1 / -1;
  padding: 20px;
  text-align: center;
  color: var(--color-text-tertiary);
  font-size: 13px;
}

/* æ°å»ºåæç¡®è®¤æ  */
.new-analysis-confirm {
  border-top: 1px solid var(--color-border);
  padding: 16px 24px;
  background: var(--color-bg-light);
  border-radius: 0 0 12px 12px;
}
.nac-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.nac-input-row label {
  font-size: 13px;
  color: var(--color-text-secondary);
  white-space: nowrap;
  min-width: 70px;
}
.nac-input-row input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 14px;
  outline: none;
}
.nac-input-row input:focus {
  border-color: var(--color-primary);
}
.nac-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}


/* æé®ç»ä¸æ ·å¼ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
}
.btn-outline {
  background: white;
  border-color: var(--color-border);
  color: var(--color-text-secondary);
}
.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(74, 85, 245, 0.03);
}

}

@media (max-width: 768px) {
  .tool-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* å½»åºéèä¸æ­¥æµç¨ï¼ç¡®ä¿ä¸å ç©ºé´ */
#threeStepWorkflow.is-hidden {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
}


/* ===== ç­ç²¾åº¦å¾ï¼åçé£æ ¼ï¼ä¸ä¸ç»æ + 4ç§è¾å¥æ¹å¼ï¼ ===== */
.isoplot-page {
  flex: 1;
  overflow-y: auto;
  padding: 40px 60px;
  background: #ffffff;
  color: #1a1a1a;
}

.ip-page-header {
  margin-bottom: 24px;
}

.ip-page-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.ip-page-icon {
  font-size: 42px;
}

.ip-page-title h1 {
  margin: 0;
  font-size: 36px;
  font-weight: 700;
  color: #1a1a1a;
}

.ip-page-desc {
  font-size: 16px;
  color: #333;
  margin: 0 0 8px 0;
}

.ip-page-sub {
  font-size: 14px;
  color: #666;
  margin: 0;
}

.ip-divider {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 24px 0;
}

.ip-input-section {
  margin-bottom: 32px;
}

.ip-section-title {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 20px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ip-link-icon {
  font-size: 18px;
  opacity: 0.5;
  cursor: pointer;
}

.ip-input-mode-group {
  margin-bottom: 20px;
}

.ip-input-mode-label {
  font-size: 15px;
  font-weight: 500;
  color: #333;
  margin: 0 0 12px 0;
}

.ip-radio-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.ip-radio-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}

.ip-radio-btn input[type="radio"] {
  margin: 0;
  cursor: pointer;
  width: 16px;
  height: 16px;
}

.ip-input-area {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  padding: 16px 20px;
  margin-top: 8px;
}

.ip-input-hint {
  font-size: 14px;
  color: #666;
  margin: 0 0 12px 0;
}

/* è¡¨æ ¼ç¼è¾å¨ */
.ip-table-editor {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
}

.ip-table-editor table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.ip-table-editor th {
  background: #f5f5f5;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 1px solid #e0e0e0;
}

.ip-table-editor td {
  padding: 0;
  border-bottom: 1px solid #f0f0f0;
}

.ip-table-editor td input {
  width: 100%;
  padding: 8px 12px;
  border: none;
  outline: none;
  font-size: 14px;
  background: transparent;
  color: #1a1a1a;
  font-family: inherit;
}

.ip-table-editor td input:focus {
  background: #f0f7ff;
}

.ip-table-editor td:first-child {
  width: 50px;
  text-align: center;
  color: #999;
  font-size: 13px;
  padding: 8px;
  background: #fafafa;
}

.ip-table-actions {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: #fafafa;
  border-top: 1px solid #e8e8e8;
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

/* ä¸ä¼ åº */
.ip-upload-zone {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
}

.ip-upload-filename {
  font-size: 13px;
  color: #2e7d32;
  background: #e8f5e9;
  padding: 4px 12px;
  border-radius: 4px;
  font-weight: 500;
}

.ip-image-hint {
  font-size: 12px;
  color: #999;
}

.ip-col-select {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #e0e0e0;
}

.ip-col-label {
  font-size: 13px;
  color: #333;
  font-weight: 500;
}

.ip-select {
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 13px;
  background: #fff;
  color: #1a1a1a;
  min-width: 120px;
}

/* ç»æåº */
.ip-result-section {
  margin-top: 32px;
}

.ip-chart-area {
  margin: 24px 0;
}

.ip-chart-title {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 12px 0;
}

.ip-chart-wrap {
  text-align: center;
  padding: 20px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
}

.ip-chart-wrap img {
  max-width: 100%;
  height: auto;
}

.ip-judge-box {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  margin: 20px 0;
}

.ip-judge-label {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.ip-judge-value {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 8px;
}

.ip-judge-text {
  font-size: 16px;
  margin-bottom: 12px;
  font-weight: 500;
}

.ip-judge-standard {
  font-size: 12px;
  color: #999;
}

.ip-table-wrap {
  overflow-x: auto;
  background: #fff;
  border-radius: 6px;
  border: 1px solid #e8e8e8;
}

.ip-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.ip-table th {
  background: #f5f5f5;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #e0e0e0;
}

.ip-table td {
  padding: 10px 16px;
  border-bottom: 1px solid #f0f0f0;
  color: #1a1a1a;
}

.ip-table tr:last-child td {
  border-bottom: none;
}

.ip-raw-toggle {
  cursor: pointer;
  padding: 12px 16px;
  background: #f5f5f5;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  user-select: none;
}

.ip-raw-toggle:hover {
  background: #eeeeee;
}

.ip-raw-content {
  margin-top: 10px;
}

.ip-download-area {
  display: flex;
  gap: 12px;
  margin: 24px 0;
}

.ip-loading {
  text-align: center;
  padding: 60px;
  color: #666;
  font-size: 15px;
}

/* æé®ç»ä¸æ ·å¼ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  font-family: inherit;
}

.btn-primary {
  background: #C70039;
  color: #fff;
  border-color: #C70039;
}

.btn-primary:hover {
  background: #900C3F;
  border-color: #900C3F;
}

.btn-outline {
  background: #fff;
  border-color: #ccc;
  color: #333;
}

.btn-outline:hover {
  background: #f5f5f5;
  border-color: #999;
}

/* ============================================================
   Streamlit 1:1 é£æ ¼è¡¥åï¼ç­ç²¾åº¦å¾ä¸ç¨ï¼
   ============================================================ */

/* Metric å¡çç½æ ¼ */
.st-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 16px 0;
}
@media (max-width: 768px) {
  .st-metric-grid { grid-template-columns: repeat(2, 1fr); }
}
.st-metric-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 16px 20px;
}
.st-metric-label {
  font-size: 13px;
  color: #666;
  margin-bottom: 4px;
  font-weight: 500;
}
.st-metric-value {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.2;
}
.st-metric-delta {
  font-size: 14px;
  font-weight: 600;
  margin-top: 2px;
}
.st-metric-delta.pass { color: #28a745; }
.st-metric-delta.fail { color: #dc3545; }

/* Streamlit alert æ¨ªå¹ */
.st-alert {
  padding: 16px 20px;
  border-radius: 8px;
  margin: 16px 0;
  font-size: 15px;
  line-height: 1.6;
  white-space: pre-line;
}
.st-alert-success {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}
.st-alert-error {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

/* Streamlit expander æå å¨ */
.st-expander {
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  margin: 16px 0;
  overflow: hidden;
}
.st-expander-header {
  padding: 12px 16px;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
  user-select: none;
}
.st-expander-header:hover { background: #fafafa; }
.st-expander-arrow {
  font-size: 12px;
  transition: transform 0.2s;
  display: inline-block;
}
.st-expander-arrow.open { transform: rotate(90deg); }
.st-expander-body {
  padding: 0 16px 16px;
  display: none;
  border-top: 1px solid #e8e8e8;
}
.st-expander-body.open { display: block; padding-top: 16px; }

/* Streamlit tabs (expander åä½¿ç¨) */
.st-tabs-header {
  display: flex;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 16px;
  gap: 0;
}
.st-tab-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #666;
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.15s;
  font-family: inherit;
}
.st-tab-btn:hover { color: #333; }
.st-tab-btn.active {
  color: #C70039;
  border-bottom-color: #C70039;
}
.st-tab-content { display: none; }
.st-tab-content.active { display: block; }

/* Streamlit æ°æ®è¡¨æ ¼ï¼expander åï¼ */
.st-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.st-data-table th {
  background: #f8f8f8;
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 1px solid #e0e0e0;
}
.st-data-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f0f0f0;
  color: #1a1a1a;
}
.st-data-table tr:last-child td { border-bottom: none; }

/* Streamlit å¬å¼è¯´æ */
.st-formula-box {
  background: #f8f9fa;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  padding: 16px;
  font-size: 14px;
  line-height: 2;
  color: #333;
}
.st-formula-box code {
  background: #e9ecef;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
}

/* é¡¹ç®æ°æ®åº */
.ip-project-section {
  margin: 24px 0;
}
.ip-project-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* é¡¹ç®å è½½ä¸æ */
.ip-project-load-panel {
  margin-top: 12px;
  display: none;
  background: #f8f9fa;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 16px;
}
.ip-project-load-panel select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  margin-bottom: 12px;
}
.ip-project-file-list {
  max-height: 200px;
  overflow-y: auto;
}
.ip-project-file-item {
  padding: 8px 12px;
  border-bottom: 1px solid #e8e8e8;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  transition: background 0.1s;
}
.ip-project-file-item:hover { background: #e8f0fe; }
.ip-project-file-item:last-child { border-bottom: none; }
.ip-project-file-name { font-weight: 500; color: #333; }
.ip-project-file-date { color: #999; font-size: 12px; }

/* Streamlit æä»¶ä¸ä¼ å¨ */
.st-file-uploader {
  border: 2px dashed #e0e0e0;
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s;
  margin: 8px 0;
}
.st-file-uploader:hover { border-color: #C70039; }
.st-file-uploader-icon { font-size: 28px; margin-bottom: 4px; }
.st-file-uploader-text { font-size: 14px; color: #666; }
.st-file-uploader-hint { font-size: 12px; color: #999; margin-top: 4px; }

/* å¯¼åºæé® */
.ip-export-area {
  margin-top: 24px;
}
.ip-export-area .btn {
  width: 100%;
}

/* ç­ç²¾åº¦å¾é¡µé¢åçåå²çº¿ */
.ip-divider {
  border: none;
  border-top: 1px solid #e8e8e8;
  margin: 20px 0;
}

/* ç­ç²¾åº¦å¾é¡µé¢åçå­æ é¢ h4 */
.ip-sub-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 24px 0 12px 0;
}

/* æå¨è¾å¥è¡¨æ ¼å¢å¼º (data_editoré£æ ¼) */
.ip-data-editor table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.ip-data-editor th {
  background: #f8f8f8;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #333;
  border-bottom: 1px solid #e0e0e0;
  text-align: left;
}
.ip-data-editor td {
  padding: 0;
  border-bottom: 1px solid #f0f0f0;
}
.ip-data-editor td input {
  width: 100%;
  padding: 6px 10px;
  border: none;
  outline: none;
  font-size: 13px;
  background: transparent;
  font-family: inherit;
  color: #1a1a1a;
}
.ip-data-editor td input:focus {
  background: #f0f7ff;
  outline: 1px solid #C70039;
  outline-offset: -1px;
}
.ip-data-editor .row-num {
  width: 40px;
  text-align: center;
  color: #999;
  font-size: 12px;
  background: #fafafa;
  padding: 6px;
  user-select: none;
}
.ip-data-editor-actions {
  display: flex;
  gap: 8px;
  padding: 8px 0;
}

/* ç¡®è®¤æ°æ®æé®åºå */
.ip-confirm-bar {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

/* API Key è¾å¥ */
.ip-api-key-group {
  margin: 8px 0;
}
.ip-api-key-group label {
  font-size: 13px;
  font-weight: 500;
  color: #333;
  display: block;
  margin-bottom: 4px;
}
.ip-api-key-group input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
}
.ip-api-key-group input:focus {
  border-color: #C70039;
  outline: none;
  box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.1);
}

/* ä¸ä¼ æä»¶é¢è§è¡¨æ ¼ */
.ip-preview-table-wrap {
  margin: 12px 0;
  max-height: 250px;
  overflow-y: auto;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
}
.ip-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.ip-preview-table th {
  background: #f8f8f8;
  padding: 6px 10px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 1px solid #e0e0e0;
  position: sticky;
  top: 0;
}
.ip-preview-table td {
  padding: 5px 10px;
  border-bottom: 1px solid #f0f0f0;
  color: #1a1a1a;
}

/* ===== å³é®/ä¸ä¸æèå ===== */
.context-menu {
  background: var(--color-bg-elevated, #fff);
  border: 1px solid var(--color-border, #e0e0e0);
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  padding: 4px 0;
  min-width: 160px;
  font-size: 13px;
}
.context-menu-item {
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.context-menu-item:hover {
  background: var(--color-bg-hover, #f5f5f5);
}

/* ===== æ¥åæ æä»¶æä½æé® ===== */
.report-file-item {
  position: relative;
}
.report-file-actions {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 14px;
  color: var(--color-text-tertiary, #999);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
}
.report-file-item:hover .report-file-actions {
  opacity: 1;
}
.report-file-actions:hover {
  background: var(--color-bg-hover, #f0f0f0);
  color: var(--color-text-primary, #333);
}



/* ============================================================
   P2 æ°å¢æ ·å¼ï¼ä»ªè¡¨ç + å¯¼èª + ä½éªæç£¨
   ============================================================ */

/* --- é¡¶æ æç´¢ --- */
.nav-center {
  flex: 1;
  max-width: 480px;
  margin: 0 24px;
}

.global-search {
  position: relative;
}

.global-search input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 14px;
  background: var(--color-surface);
  color: var(--color-text-primary);
  outline: none;
  transition: all 0.2s;
}

.global-search input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-light);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  opacity: 0.5;
}

.search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
}

.search-result-item {
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.15s;
}

.search-result-item:hover {
  background: var(--color-surface-secondary);
}

.search-result-icon {
  font-size: 20px;
}

.search-result-name {
  font-size: 14px;
  color: var(--color-text-primary);
}

.search-result-category {
  font-size: 12px;
  color: var(--color-text-tertiary);
  margin-left: auto;
}

.search-no-result {
  padding: 24px;
  text-align: center;
  color: var(--color-text-tertiary);
  font-size: 13px;
}

/* --- ä¾§è¾¹æ æ°å¢ï¼header + æå  + å¯¼èª --- */
.sidebar-header {
  padding: 10px 12px;
  display: flex;
  justify-content: flex-end;
}

.sidebar-toggle {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--color-text-secondary);
  font-size: 12px;
  transition: all 0.2s;
}

.sidebar-toggle:hover {
  background: var(--color-surface-secondary);
  color: var(--color-text-primary);
}

.sidebar-nav {
  padding: 0 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 14px;
  color: var(--color-text-secondary);
  transition: all 0.15s;
  user-select: none;
}

.nav-item:hover {
  background: var(--color-surface-secondary);
  color: var(--color-text-primary);
}

.nav-item.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 500;
}

.nav-icon {
  font-size: 18px;
  width: 20px;
  text-align: center;
}

/* æå ç¶æ */
.sidebar.collapsed {
  width: 64px;
  min-width: 64px;
}

.sidebar.collapsed .nav-label,
.sidebar.collapsed .sidebar-title span:not(.section-caret):not(.section-count),
.sidebar.collapsed .report-actions,
.sidebar.collapsed .btn-new-analysis span:not(.new-analysis-icon),
.sidebar.collapsed .file-item-name,
.sidebar.collapsed .file-item-tool,
.sidebar.collapsed .report-section-title,
.sidebar.collapsed .report-file-name,
.sidebar.collapsed .section-count,
.sidebar.collapsed .sidebar-divider {
  display: none;
}

.sidebar.collapsed .sidebar-nav {
  padding: 0 8px;
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 10px 0;
}

.sidebar.collapsed .sidebar-new-analysis {
  padding: 0 8px;
}

.sidebar.collapsed .btn-new-analysis {
  justify-content: center;
  padding: 10px;
}

.sidebar.collapsed .toggle-icon {
  display: inline-block;
  transform: rotate(180deg);
}

/* --- ä»ªè¡¨ç --- */
.dashboard-view {
  display: none;
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.dashboard-view.active {
  display: block;
}

.tool-view {
  display: none;
}

.tool-view.active {
  display: block;
}

.dashboard-welcome {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-purple) 100%);
  border-radius: var(--radius-lg);
  padding: 32px;
  color: white;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.welcome-title {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 8px 0;
}

.welcome-subtitle {
  font-size: 14px;
  opacity: 0.85;
  margin: 0;
}

.welcome-actions {
  display: flex;
  gap: 12px;
}

.welcome-actions .btn-primary {
  background: white;
  color: var(--color-primary);
  border: none;
}

.welcome-actions .btn-primary:hover {
  background: rgba(255,255,255,0.9);
}

.welcome-actions .btn-secondary {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
}

.welcome-actions .btn-secondary:hover {
  background: rgba(255,255,255,0.25);
}

/* ç»è®¡å¡ç */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s;
}

.stat-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--color-border);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.stat-icon-blue { background: var(--color-primary-light); }
.stat-icon-green { background: #e8f7ee; }
.stat-icon-purple { background: #f3eaff; }
.stat-icon-orange { background: #fff3e8; }

.stat-number {
  font-size: 28px;
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-top: 4px;
}

/* dashboard section */
.dashboard-section {
  margin-bottom: 32px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0;
}

.section-subtitle {
  font-size: 13px;
  color: var(--color-text-tertiary);
}

.btn-text {
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.btn-text:hover {
  background: var(--color-primary-light);
}

/* æè¿æä»¶ */
.recent-files {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.recent-file-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.recent-file-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.recent-file-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.recent-file-icon {
  font-size: 24px;
}

.recent-file-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-file-tool {
  font-size: 12px;
  color: var(--color-text-tertiary);
  margin-bottom: 8px;
}

.recent-file-time {
  font-size: 12px;
  color: var(--color-text-tertiary);
}

/* ç©ºç¶æ */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-lg);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-text {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}

/* å·¥å·åç±»å¡çç½æ ¼ */
.tool-category {
  margin-bottom: 24px;
}

.category-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.cat-locate { background: var(--color-primary); }
.cat-verify { background: var(--color-purple); }
.cat-optimize { background: var(--color-success); }
.cat-manage { background: var(--color-warning); }

.tool-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.tool-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.tool-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.tool-card-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.tool-card-info {
  flex: 1;
  min-width: 0;
}

.tool-card-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-card-desc {
  font-size: 12px;
  color: var(--color-text-tertiary);
}

.tool-card-badge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--color-surface-secondary);
  color: var(--color-text-secondary);
}

.tool-card-badge.free { background: #e8f7ee; color: var(--color-success); }
.tool-card-badge.pro { background: #fff3e8; color: var(--color-warning); }

/* --- Loading éª¨æ¶å± --- */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(2px);
}

.loading-content {
  text-align: center;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-size: 14px;
  color: var(--color-text-secondary);
}

/* tool-panel éè¦ relative å®ä½æ¥æ¾loading */
.tool-panel {
  position: relative;
}

/* --- ååºå¼ --- */
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-welcome {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .nav-center {
    display: none;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .tool-card-grid {
    grid-template-columns: 1fr;
  }

  .recent-files {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   P2-B: å·¥å·ä½¿ç¨è¯´ææå åº
   ============================================================ */
.help-section {
  margin-top: 24px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-secondary);
  overflow: hidden;
}

.help-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}

.help-section-header:hover {
  background: var(--bg-hover);
}

.help-section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.help-section-toggle {
  font-size: 14px;
  color: var(--text-secondary);
  transition: transform 0.3s;
}

.help-section.open .help-section-toggle {
  transform: rotate(180deg);
}

.help-section-body {
  display: none;
  padding: 0 18px 18px;
  border-top: 1px solid var(--border-color);
}

.help-section.open .help-section-body {
  display: block;
}

.help-block {
  margin-top: 14px;
}

.help-block:first-child {
  margin-top: 16px;
}

.help-block h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-color);
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.help-block p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0;
}

.help-block .help-tag {
  display: inline-block;
  padding: 2px 8px;
  background: var(--primary-light);
  color: var(--primary-color);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  margin-right: 6px;
}

/* ============================================================
   P2-D: SEO éèåå®¹
   ============================================================ */
.seo-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   æ°å¢ï¼ç¤ºä¾æ°æ®æé®æ ·å¼
   ============================================================ */
.sample-btn-wrap {
  margin-top: 12px;
  text-align: center;
}

.sample-data-btn {
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #4b5563;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.sample-data-btn:hover {
  border-color: var(--color-primary, #C70039);
  color: var(--color-primary, #C70039);
  background: #f8fafc;
}

.sample-btn-hint {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 6px;
}

/* ============================================================
   æ°å¢ï¼é¡µèæ ·å¼
   ============================================================ */
.site-footer {
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
  padding: 20px 0;
  margin-top: 40px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}

.footer-links {
  margin-bottom: 8px;
}

.footer-links a {
  color: #6b7280;
  font-size: 12px;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--color-primary, #C70039);
}

.footer-sep {
  color: #d1d5db;
  margin: 0 8px;
  font-size: 12px;
}

.footer-copyright {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 4px;
}

.footer-tech {
  font-size: 11px;
  color: #d1d5db;
}

/* ============================================================
   æ°å¢ï¼404é¡µé¢æ ·å¼
   ============================================================ */
.not-found-page {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  z-index: 9999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}

.not-found-page.show {
  display: flex;
}

.not-found-page .nf-code {
  font-size: 72px;
  font-weight: 700;
  color: var(--color-primary, #C70039);
  margin-bottom: 10px;
}

.not-found-page .nf-title {
  font-size: 20px;
  color: #1f2937;
  margin-bottom: 8px;
}

.not-found-page .nf-desc {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 24px;
}

/* ============================================================
   æ°å¢ï¼åé¦æ¬æµ®æé®ä¸å¼¹çª
   ============================================================ */
.feedback-float-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-primary, #C70039);
  color: #fff;
  font-size: 22px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.feedback-float-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.feedback-modal {
  position: fixed;
  bottom: 84px;
  right: 20px;
  width: 320px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  z-index: 1001;
  display: none;
  overflow: hidden;
}

.feedback-modal.show {
  display: block;
}

.feedback-header {
  background: var(--color-primary, #C70039);
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.feedback-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.feedback-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.feedback-body {
  padding: 16px;
}

.feedback-form-group {
  margin-bottom: 12px;
}

.feedback-form-group label {
  display: block;
  font-size: 13px;
  color: #374151;
  margin-bottom: 4px;
}

.feedback-form-group input,
.feedback-form-group textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  box-sizing: border-box;
}

.feedback-form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.feedback-form-group input:focus,
.feedback-form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary, #C70039);
}

.feedback-submit {
  width: 100%;
  padding: 8px;
  background: var(--color-primary, #C70039);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}

.feedback-submit:hover {
  opacity: 0.9;
}

.feedback-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 10000;
  display: none;
}

.feedback-toast.show {
  display: block;
}

/* ç½ç»å¼å¸¸å¨å±æç¤ºæ¡ */
.network-error-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #ef4444;
  color: #fff;
  text-align: center;
  padding: 8px 16px;
  font-size: 13px;
  z-index: 99999;
  display: none;
}

.network-error-bar.show {
  display: block;
}

/* åè®®/éç§æ¨¡ææ¡ */
.terms-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.terms-modal.show {
  display: flex;
}

.terms-modal-content {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
}

.terms-modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: #fff;
}

.terms-modal-header h3 {
  margin: 0;
  font-size: 16px;
}

.terms-modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #6b7280;
  padding: 0;
}

.terms-modal-body {
  padding: 20px;
  font-size: 14px;
  color: #4b5563;
  line-height: 1.7;
}

.terms-modal-body p {
  margin-bottom: 12px;
}

@media (max-width: 640px) {
  .feedback-modal {
    width: calc(100% - 40px);
    right: 20px;
    bottom: 84px;
  }
  .footer-content {
    padding: 0 12px;
  }
}


/* ===== 首页工具卡片 ===== */
.home-tool-card {
  position: relative;
  background: #fff;
  border: 1px solid #e8ecf0;
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px;
}

.home-tool-card:hover {
  border-color: #4a90d9;
  box-shadow: 0 4px 12px rgba(74, 144, 217, 0.15);
  transform: translateY(-2px);
}

.home-tool-card.locked {
  opacity: 0.7;
  cursor: not-allowed;
}

.home-tool-card.locked:hover {
  border-color: #e8ecf0;
  box-shadow: none;
  transform: none;
}

.home-tool-icon {
  font-size: 28px;
  line-height: 1;
}

.home-tool-name {
  font-size: 15px;
  font-weight: 600;
  color: #1a1d23;
}

.home-tool-desc {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.home-tool-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
}

.home-tool-badge.free {
  background: #e8f5e9;
  color: #2e7d32;
}

.home-tool-badge.pro {
  background: #fff3e0;
  color: #e65100;
}

.home-tool-lock {
  position: absolute;
  bottom: 12px;
  right: 12px;
  font-size: 14px;
}

/* ============================================================
   首页 AI 专家入口卡（白底简约：细边框 + 左侧红条）
   ============================================================ */
.expert-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: 22px 26px;
}
.expert-cta-text h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0 0 6px;
}
.expert-cta-text p {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin: 0;
  line-height: 1.7;
  max-width: 560px;
}
.expert-cta-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.expert-cta-actions .btn-primary {
  display: inline-block;
  padding: 9px 18px;
  text-decoration: none;
  font-size: 14px;
}
.expert-cta-actions .btn-secondary {
  display: inline-block;
  padding: 9px 18px;
  text-decoration: none;
  font-size: 14px;
}
@media (max-width: 760px) {
  .expert-cta { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   P0 修复：主内容区被挤压导致的布局塌缩
   根因：AI 面板固定 360px + 统计卡固定 4 列
        → 主区实际可用宽 < 4×156px，.stat-content 无 min-width
        → flex 子项塌缩到 min-content（中文=1字宽）→ 文字竖排
   ============================================================ */

/* 1. 统计卡：内容区不再塌缩 */
.stat-content {
  flex: 1 1 auto;
  min-width: 0;
}
.stat-label {
  white-space: nowrap;
}

/* 2. 统计网格：按可用宽度自适应列数，不再固定 4 列 */
.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

/* 3. AI 面板：不再无条件抢占 360px */
.ai-panel {
  width: 340px;
  transition: width .18s ease, transform .18s ease;
}
.content-area.ai-collapsed .ai-panel {
  width: 0;
  overflow: hidden;
  border-right: none;
}
.ai-panel-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
}
.ai-panel-toggle:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
/* 移动端：AI 面板改为浮层抽屉，默认收起 */
.ai-fab {
  display: none;
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  border: none;
  font-size: 20px;
  box-shadow: 0 4px 16px rgba(199, 0, 57, .35);
  cursor: pointer;
  z-index: 60;
}
@media (max-width: 1200px) {
  .ai-panel {
    width: 300px;
  }
}
@media (max-width: 900px) {
  .ai-panel {
    position: fixed;
    top: 56px;
    right: 0;
    bottom: 0;
    width: min(360px, 88vw);
    z-index: 55;
    box-shadow: -4px 0 18px rgba(0, 0, 0, .08);
    transform: translateX(100%);
  }
  .content-area.ai-collapsed .ai-panel {
    width: min(360px, 88vw);
  }
  .ai-panel.ai-open {
    transform: translateX(0);
  }
  .ai-fab {
    display: block;
  }
  .main-container {
    height: calc(100dvh - 56px);
  }
}
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   欢迎区 + 四大能力卡（白底简约，与对外页面统一）
   ============================================================ */
.dashboard-welcome {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-primary);
  color: var(--color-text-primary);
}
.welcome-title {
  color: var(--color-text-primary);
}
.welcome-subtitle {
  color: var(--color-text-secondary);
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.capability-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 18px 20px 16px;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.capability-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.capability-card:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.capability-ico {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 12px;
}
.capability-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0 0 6px;
}
.capability-card p {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.65;
  margin: 0 0 12px;
  min-height: 42px;
}
.capability-link {
  font-size: 13px;
  color: var(--color-primary);
  font-weight: 500;
}
@media (max-width: 768px) {
  .capability-grid {
    grid-template-columns: 1fr;
  }
  .capability-card p {
    min-height: 0;
  }
}

/* ============================================================
   第二期 · 图标统一（内联 SVG 尺寸）+ 弹窗滚动锁
   ============================================================ */
.ic {
  width: 1.1em;
  height: 1.1em;
  vertical-align: -0.16em;
  display: inline-block;
  flex-shrink: 0;
  stroke: currentColor;
}
.nav-icon .ic { width: 18px; height: 18px; }
.menu-icon .ic { width: 15px; height: 15px; }
.search-icon .ic { width: 15px; height: 15px; }
.stat-icon .ic { width: 22px; height: 22px; }
.capability-ico .ic { width: 20px; height: 20px; }
.tool-icon-large .ic { width: 20px; height: 20px; }
.empty-icon .ic,
.upload-icon .ic,
.paywall-icon .ic { width: 26px; height: 26px; }
.feedback-float-btn .ic { width: 18px; height: 18px; }
.ai-fab .ic { width: 22px; height: 22px; }
.home-tool-icon .ic { width: 20px; height: 20px; }
.modal-tool-icon .ic,
.file-item-icon .ic,
.report-file-icon .ic,
.ip-page-icon .ic { width: 15px; height: 15px; }
.pw-feat .ic { width: 15px; height: 15px; color: var(--color-primary); }

/* 弹窗打开时锁定背景滚动 */
body.modal-open {
  overflow: hidden;
}

/* 顶栏：AI 专家库升级为带图标的按钮 */
.nav-right a.nav-expert-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: 12px;
  font-size: 13px;
  color: var(--color-text-secondary);
  text-decoration: none;
  line-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color .15s, color .15s;
}
.nav-right a.nav-expert-link:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.nav-right a.nav-expert-link .ic { width: 15px; height: 15px; }

/* ============================================================
   第三期 · 专家矩阵 + 报告双模板
   ============================================================ */
.expert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.expert-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 18px 20px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.expert-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.expert-card:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.expert-card.planned {
  background: var(--color-surface-secondary);
  border-style: dashed;
  cursor: default;
}
.expert-card.planned:hover { transform: none; box-shadow: none; border-color: var(--color-border); }
.expert-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.expert-ico {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.expert-ico .ic { width: 20px; height: 20px; }
.expert-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--color-primary-light);
  color: var(--color-primary);
}
.expert-badge.soon {
  background: var(--color-surface);
  color: var(--color-text-tertiary);
  border: 1px solid var(--color-border);
}
.expert-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0 0 6px;
}
.expert-tagline {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0 0 10px;
  min-height: 42px;
}
.expert-scenes { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.expert-scene {
  font-size: 11px;
  color: var(--color-text-tertiary);
  border: 1px solid var(--color-border);
  border-radius: 3px;
  padding: 1px 6px;
}
.capability-link.muted { color: var(--color-text-tertiary); }

.tpl-switch {
  display: flex;
  margin: 0 12px 6px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.tpl-btn {
  flex: 1;
  padding: 6px 0;
  font-size: 12px;
  background: var(--color-surface);
  color: var(--color-text-secondary);
  border: none;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.tpl-btn + .tpl-btn { border-left: 1px solid var(--color-border); }
.tpl-btn.active { background: var(--color-primary); color: #fff; }
.tpl-hint {
  font-size: 11px;
  color: var(--color-text-tertiary);
  padding: 0 12px 8px;
}
.report-node {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 12.5px;
  color: var(--color-text-secondary);
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.report-node:hover { background: var(--color-surface-secondary); }
.report-node.filled { color: var(--color-text-primary); }
.sec-num {
  width: 17px;
  height: 17px;
  border-radius: 3px;
  background: var(--color-surface-secondary);
  color: var(--color-text-tertiary);
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.report-node.filled .sec-num { background: var(--color-primary); color: #fff; }
.sec-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sec-src { font-size: 10px; padding: 0 5px; border-radius: 8px; flex-shrink: 0; }
.sec-src.expert { background: var(--color-primary-light); color: var(--color-primary); }
.sec-src.tool { background: #e8f7ee; color: #2e7d32; }
.report-empty { font-size: 12px; color: var(--color-text-tertiary); padding: 10px 12px; }

/* 学习资料 */
.dl-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:12px; }
.dl-card{
  background:var(--color-surface); border:1px solid var(--color-border);
  border-radius:8px; padding:14px 16px;
  display:flex; flex-direction:column;
}
.dl-card.gate{
  flex-direction:row; align-items:center; justify-content:space-between;
  gap:16px; flex-wrap:wrap; border-color:#F5C6D3; background:#FDEFF3;
}
.dl-card.pending{ opacity:.72; }
.dl-title{ font-size:14px; font-weight:600; color:var(--color-text-primary); margin-bottom:4px; }
.dl-desc{ font-size:12.5px; color:var(--color-text-secondary); line-height:1.65; margin-bottom:10px; flex:1; }
.dl-gate-text{ font-size:13.5px; color:#33384A; line-height:1.7; }
.dl-gate-text b{ color:var(--color-primary); }
.dl-gate-btns{ display:flex; gap:8px; flex-shrink:0; }
.dl-btn{ align-self:flex-start; }
.dl-btn.disabled{
  font-size:12px; color:var(--color-text-tertiary); cursor:default;
  padding:5px 12px; border:1px solid var(--color-border); border-radius:4px;
}
  document.addEventListener('DOMContentLoaded', function () {
    if (typeof renderDownloads === 'function') {
      try { renderDownloads(); } catch (e) { console.warn(e); }
    }
  });

/* 工作台紧凑化：收紧留白 */
.dashboard-section{ margin-bottom:22px; }
.section-header{ margin-bottom:11px; }
.capability-grid{ gap:10px; margin-bottom:18px; }
.capability-card{ padding:14px 16px; }
.capability-ico{ width:30px; height:30px; }
.expert-grid{ gap:10px; }
.expert-card{ padding:14px 16px; }
.dl-grid{ gap:10px; }
.dl-card{ padding:12px 14px; }
.welcome-title{ font-size:20px; margin-bottom:4px; }
.welcome-subtitle{ font-size:13px; }
.ip-page-header{ margin-bottom:16px; }
.ip-page-title{ margin-bottom:8px; }
.ip-page-desc{ font-size:15px; margin-bottom:6px; }
.dashboard-welcome{ padding:20px 24px; }
.dashboard-welcome.gap{ gap:12px; }

/* 欢迎区去红：改白底 + 左侧品牌色条（与大块红色相比更耐看） */
.dashboard-welcome{
  background:#fff;
  border:1px solid var(--color-border);
  border-left:3px solid var(--color-primary);
  border-radius:var(--radius-md);
  box-shadow:none;
}
.dashboard-welcome .welcome-title{ color:var(--color-text-primary); }
.dashboard-welcome .welcome-subtitle{ color:var(--color-text-secondary); opacity:1; }
.dashboard-welcome .btn-primary{ background:var(--color-primary); }

/* 底部极简信息条：一行横排 */
.app-foot{
  border-top:1px solid var(--color-border);
  padding:9px 20px; background:var(--color-bg);
}
.app-foot .foot-line{
  display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:3px 16px;
  font-size:11.5px; line-height:1.7; color:var(--color-text-tertiary);
}
.app-foot .foot-line > span{ white-space:nowrap; }
.app-foot .foot-line a{ color:var(--color-text-tertiary); text-decoration:none; }
.app-foot .foot-line a:hover{ color:var(--color-primary); }

/* ===== 工作台：内嵌对话区 + 侧边栏专家列表 ===== */
.chat-view-bar{
  display:flex; align-items:center; gap:12px;
  padding:10px 16px; border-bottom:1px solid var(--color-border);
  background:var(--color-surface); flex-shrink:0;
}
.back-btn{
  display:inline-flex; align-items:center; justify-content:center;
  width:28px; height:28px; border:1px solid var(--color-border);
  border-radius:6px; background:#fff; cursor:pointer; color:var(--color-text-secondary);
}
.back-btn:hover{ border-color:var(--color-primary); color:var(--color-primary); }
.back-btn .ic{ width:15px; height:15px; }
.chat-view-title{ display:flex; align-items:center; gap:7px; font-size:14px; font-weight:600; color:var(--color-text-primary); }
.chat-view-title .ic{ width:16px; height:16px; color:var(--color-primary); }
.chat-view-ext{ margin-left:auto; font-size:12.5px; color:var(--color-text-tertiary); text-decoration:none; }
.chat-view-ext:hover{ color:var(--color-primary); }
#chatView{
  display:flex; flex-direction:column;
  height:100%; min-height:0; padding:0; max-width:none; margin:0;
}
.chat-view-bar{ flex-shrink:0; }
.chat-view-body{ flex:1; min-height:0; }
.chat-view-body iframe{ width:100%; height:100%; border:none; display:block; background:#fff; }

.sidebar-expert-list{ margin-top:8px; }
.sel-title{ font-size:11px; color:var(--color-text-tertiary); padding:4px 2px 6px; }
.side-expert{
  display:flex; align-items:flex-start; gap:8px;
  padding:8px 9px; border-radius:6px; cursor:pointer; margin-bottom:2px;
}
.side-expert:hover{ background:var(--color-primary-light, #FDEFF3); }
.side-expert.pending{ opacity:.5; cursor:default; }
.se-dot{ width:6px; height:6px; border-radius:50%; background:var(--color-primary); margin-top:6px; flex-shrink:0; }
.side-expert.pending .se-dot{ background:var(--color-text-tertiary); }
.se-name{ font-size:12.5px; color:var(--color-text-primary); line-height:1.4; }
.se-desc{ font-size:11px; color:var(--color-text-tertiary); line-height:1.5; margin-top:1px; }
.btn-new-analysis.expanded{ background:var(--color-primary-hover, #900C3F); }

/* ============================================================
   批7 · 项目管理器 + 报告章节文件数（2026-10-21）
   ============================================================ */
.pm-modal { width: 100%; max-width: 560px; padding-bottom: 20px; }
.pm-body { padding: 0 24px; max-height: 56vh; overflow-y: auto; }
.pm-loading, .pm-empty {
  font-size: 13px; color: var(--color-text-tertiary);
  padding: 28px 10px; text-align: center; line-height: 1.8;
}
.pm-list { display: flex; flex-direction: column; gap: 8px; }
.pm-item {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--color-border-light, #EFEFF3);
  border-radius: 8px; padding: 10px 12px;
  transition: border-color .15s, background .15s;
}
.pm-item:hover { border-color: var(--color-primary-light); }
.pm-item.active { border-color: var(--color-primary); background: var(--color-primary-light); }
.pm-item-main { flex: 1; min-width: 0; cursor: pointer; }
.pm-item-name {
  font-size: 13.5px; font-weight: 600; color: var(--color-text-primary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pm-item-meta { font-size: 11.5px; color: var(--color-text-tertiary); margin-top: 2px; }
.pm-item-actions { display: flex; gap: 6px; flex-shrink: 0; }
.pm-btn {
  font-size: 12px; padding: 5px 12px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--color-border-light, #E3E6EA);
  background: #fff; color: var(--color-text-secondary);
  transition: all .15s;
}
.pm-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.pm-btn.danger:hover { border-color: #C70039; color: #C70039; background: #FDEFF3; }

/* 报告树章节文件数徽标 */
.sec-count {
  font-size: 10px; padding: 0 6px; border-radius: 8px; flex-shrink: 0;
  background: var(--color-surface-secondary, #F4F6F8);
  color: var(--color-text-tertiary, #656B77);
}
