/* 图书馆科研创新 AI 工作台 - 首页总览样式 */

:root {
  --primary: #1E5BE0;
  --primary-dark: #0B2F8A;
  --primary-light: #E8F0FE;
  --primary-hover: #1849B8;
  --teal: #12A6A6;
  --teal-light: #E6F7F7;
  --orange: #F59E0B;
  --orange-light: #FEF3E2;
  --purple: #7C5CFF;
  --purple-light: #F0EBFF;
  --green: #10B981;
  --green-light: #E6F9F2;
  --bg: #F7F9FC;
  --card: #FFFFFF;
  --card-bg: #FFFFFF;
  --bg-muted: #F0F4F8;
  --border: #E5EAF2;
  --text: #1A2332;
  --text-secondary: #5A6578;
  --text-muted: #8B95A5;
  --shadow-sm: 0 1px 3px rgba(15, 35, 80, 0.06);
  --shadow-md: 0 4px 16px rgba(15, 35, 80, 0.08);
  --radius: 10px;
  --radius-lg: 14px;
  --sidebar-w: 220px;
  --header-h: 64px;
  --bottom-nav-h: 56px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body.sidebar-open {
  overflow: hidden;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.menu-btn {
  display: none;
  flex-shrink: 0;
}

.notify-wrap {
  position: relative;
}

.notify-panel {
  display: none;
  position: absolute;
  right: 0;
  top: 44px;
  width: 320px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  z-index: 200;
  max-height: 400px;
  overflow-y: auto;
}

.notify-panel.open {
  display: block;
}

.notify-item {
  display: block;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}
.notify-item:hover { background: var(--bg-muted, #f8fafc); }
.notify-item strong { font-size: 13px; display: block; }
.notify-item p { font-size: 12px; color: var(--text-secondary); margin-top: 4px; line-height: 1.5; }
.notify-item.is-read { opacity: 0.7; }
.notify-empty { padding: 16px; color: var(--text-muted); font-size: 13px; margin: 0; }
.notify-error { color: #c62828; }

.hide-mobile {
  /* visible on desktop */
}

.show-mobile-only {
  display: none !important;
}

.sidebar-mobile-footer {
  display: none;
}

.sidebar-overlay {
  display: none;
}

.sidebar-header-mobile {
  display: none;
}

.mobile-bottom-nav {
  display: none;
}

/* ========== 顶部导航 ========== */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--header-h) + var(--safe-top));
  padding-top: var(--safe-top);
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding-left: 24px;
  padding-right: 24px;
  gap: 12px;
  z-index: 100;
  overflow: hidden;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.brand-text {
  min-width: 0;
  overflow: hidden;
}

.brand-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary) 0%, #3B7EFF 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-logo svg {
  width: 24px;
  height: 24px;
  fill: white;
}

.brand-text h1 {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-dark);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-text p {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.topbar-search {
  flex: 1 1 160px;
  min-width: 0;
  max-width: 360px;
  margin: 0 8px;
  position: relative;
}

.topbar-search input {
  width: 100%;
  height: 38px;
  padding: 0 16px 0 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.topbar-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 91, 224, 0.12);
  background: var(--card);
}

.topbar-search input::placeholder {
  color: var(--text-muted);
}

.topbar-search .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-shrink: 0;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  position: relative;
  transition: background 0.2s;
}

.icon-btn:hover {
  background: var(--bg);
}

.icon-btn .badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: #EF4444;
  color: white;
  font-size: 10px;
  font-weight: 600;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 4px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.user-menu:hover {
  background: var(--bg);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--teal) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 13px;
  font-weight: 600;
}

.user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.btn-primary {
  height: 36px;
  padding: 0 18px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 2px 8px rgba(30, 91, 224, 0.3);
}

.btn-outline {
  height: 36px;
  padding: 0 18px;
  background: var(--card);
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

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

/* ========== 侧边栏 ========== */
.sidebar {
  position: fixed;
  top: calc(var(--header-h) + var(--safe-top));
  left: 0;
  width: var(--sidebar-w);
  height: calc(100vh - var(--header-h) - var(--safe-top));
  background: var(--card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 90;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 2px;
  transition: all 0.2s;
  position: relative;
}

.nav-item:hover {
  background: var(--bg);
  color: var(--text);
}

.nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--primary);
  border-radius: 0 2px 2px 0;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}

.nav-item.active svg {
  opacity: 1;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.sidebar-illustration {
  width: 100%;
  height: 100px;
  background: linear-gradient(180deg, var(--primary-light) 0%, rgba(232, 240, 254, 0.3) 100%);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
}

.sidebar-illustration svg {
  width: 64px;
  height: 64px;
  opacity: 0.5;
}

/* ========== 主内容区 ========== */
.main {
  margin-left: var(--sidebar-w);
  margin-top: calc(var(--header-h) + var(--safe-top));
  padding: 28px 32px 48px;
  min-height: calc(100vh - var(--header-h) - var(--safe-top));
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
}

.page-header h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 6px;
}

.page-header p,
.page-header .page-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 0;
  max-width: 640px;
  line-height: 1.6;
}

.page-header > div:first-child {
  flex: 1;
  min-width: 0;
}

/* ========== KPI 卡片 ========== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.kpi-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: box-shadow 0.2s;
}

.kpi-card:hover {
  box-shadow: var(--shadow-md);
}

.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kpi-icon.blue { background: var(--primary-light); color: var(--primary); }
.kpi-icon.teal { background: var(--teal-light); color: var(--teal); }
.kpi-icon.orange { background: var(--orange-light); color: var(--orange); }
.kpi-icon.purple { background: var(--purple-light); color: var(--purple); }

.kpi-body label {
  font-size: 13px;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 6px;
}

.kpi-body .value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 4px;
}

.kpi-body .trend {
  font-size: 12px;
  color: #10B981;
  font-weight: 500;
}

.kpi-body .trend::before {
  content: "↑ ";
}

/* ========== 卡片通用 ========== */
.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}

.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card-title h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title h3 .title-icon {
  color: var(--primary);
}

.link-btn {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}

.link-btn:hover {
  text-decoration: underline;
}

/* ========== 中部双栏 ========== */
.mid-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

/* 快速生成表单 */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.form-group select,
.form-group textarea,
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="number"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: var(--card);
  outline: none;
  transition: border-color 0.2s;
}

.form-group select:focus,
.form-group textarea:focus,
.form-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 91, 224, 0.1);
}

.form-group textarea {
  min-height: 88px;
  resize: vertical;
}

/* ========== 表单控件（全局） ========== */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: var(--card);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 91, 224, 0.1);
}

textarea {
  min-height: 88px;
  resize: vertical;
  line-height: 1.5;
}

.input-sm {
  width: auto;
  min-width: 140px;
  padding: 8px 12px;
}

/* ========== 弹窗 ========== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 35, 80, 0.45);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.open {
  display: flex;
}

body.modal-open {
  overflow: hidden;
}

.modal-box {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 24px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow: auto;
}

.modal-box h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  color: var(--primary-dark);
}

.modal-box .form-group {
  margin-bottom: 0;
}

.modal-box .form-group label {
  margin-top: 14px;
}

.field-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin: 6px 0 0;
}

.form-advanced {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-muted, #f8fafc);
}
.form-advanced summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.name-preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.name-chip {
  padding: 5px 10px;
  font-size: 11px;
  line-height: 1.3;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  max-width: 100%;
  text-align: left;
}

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

.ai-suggestions {
  margin-top: 10px;
  padding: 10px 12px;
  background: linear-gradient(90deg, #eef6ff, #f8fafc);
  border: 1px solid #bfdbfe;
  border-radius: 8px;
}

.ai-suggest-title {
  margin: 0 0 8px;
  font-size: 12px;
  color: #1e40af;
  font-weight: 500;
}

.ai-suggest-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ai-suggest-card {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.ai-suggest-card:hover {
  border-color: var(--primary);
  background: #f0f7ff;
}

.ai-suggest-head {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
}

.ai-suggest-cat {
  color: #6b7280;
  font-size: 11px;
}

.ai-suggest-name {
  flex: 1;
  font-weight: 500;
  color: var(--text-primary);
}

.ai-suggest-score {
  font-size: 11px;
  color: var(--primary-dark);
  background: #dbeafe;
  padding: 1px 6px;
  border-radius: 10px;
}

.ai-suggest-hint {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 24px;
  justify-content: flex-end;
}

/* ========== 确认弹窗 ========== */
.confirm-backdrop {
  z-index: 300;
  animation: confirm-fade-in 0.2s ease;
}

.confirm-box {
  text-align: center;
  max-width: 400px;
  padding: 28px 24px 24px;
  animation: confirm-slide-in 0.22s ease;
}

.confirm-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.confirm-icon-warn {
  background: #fef3c7;
  color: #d97706;
}

.confirm-icon-danger {
  background: #fee2e2;
  color: #dc2626;
}

.confirm-box h3 {
  font-size: 17px;
  margin-bottom: 10px;
}

.confirm-message {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  white-space: pre-line;
  margin: 0;
  text-align: center;
}

.confirm-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.confirm-actions .btn-outline,
.confirm-actions .btn-primary {
  flex: 1;
  min-height: 44px;
  justify-content: center;
}

.btn-danger {
  background: #dc2626;
  border-color: #dc2626;
}

.btn-danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

@keyframes confirm-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes confirm-slide-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 768px) {
  .confirm-box {
    padding: 24px 20px 20px;
  }

  .confirm-actions {
    flex-direction: column-reverse;
  }
}

/* ========== 课题列表页 ========== */
.kpi-grid-mini {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.kpi-mini {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
}

.kpi-mini label {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}

.kpi-mini .val {
  font-size: 22px;
  font-weight: 700;
  margin-top: 4px;
}

.demo-banner {
  padding: 14px 18px;
  border-radius: 10px;
  background: linear-gradient(90deg, #eef4ff, #f5f0ff);
  border: 1px solid var(--primary);
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.projects-toolbar {
  margin-bottom: 16px;
}

.project-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: 0.15s;
  background: var(--card);
}

.project-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.project-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.project-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.status-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: var(--bg-muted);
}

.status-tag.in_progress {
  background: #e8f4fd;
  color: #1565c0;
}

.status-tag.completed {
  background: #e8f5e9;
  color: #2e7d32;
}

.char-count {
  text-align: right;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

/* 推荐选题列表 */
.topic-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.topic-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}

.topic-item:hover {
  border-color: var(--border);
  background: var(--card);
}

.topic-rank {
  width: 28px;
  height: 28px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.topic-content {
  flex: 1;
  min-width: 0;
}

.topic-content h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
}

.topic-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.tag.stars {
  color: var(--orange);
  border-color: #FDE68A;
  background: #FFFBEB;
}

.topic-detail {
  flex-shrink: 0;
  align-self: center;
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}

.topic-detail:hover {
  text-decoration: underline;
}

/* ========== 下方三栏 ========== */
.bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

/* 环形图 */
.chart-donut-wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 8px 0;
}

.donut-chart {
  width: 140px;
  height: 140px;
  flex-shrink: 0;
}

.chart-legend {
  flex: 1;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.legend-item span.label {
  flex: 1;
  color: var(--text-secondary);
}

.legend-item span.pct {
  font-weight: 600;
  color: var(--text);
}

/* 数据表格 */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -4px;
  padding: 0 4px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 480px;
}

.data-table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--bg);
  color: var(--text-secondary);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

.data-table th:not(:first-child) {
  text-align: right;
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.data-table td:not(:first-child) {
  text-align: right;
}

.data-table tbody tr:hover {
  background: var(--bg);
}

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

/* 成果导出 */
.export-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.export-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
}

.export-btn:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.export-btn .export-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.export-btn:hover .export-icon {
  background: var(--card);
  border-color: var(--primary);
}

/* ========== 核心能力 ========== */
.capabilities {
  margin-bottom: 20px;
}

.capabilities .card-title {
  margin-bottom: 16px;
}

.cap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.cap-card {
  padding: 20px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: box-shadow 0.2s;
}

.cap-card:hover {
  box-shadow: var(--shadow-sm);
}

.cap-card h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cap-card h4 .cap-num {
  width: 22px;
  height: 22px;
  background: var(--primary);
  color: white;
  border-radius: 6px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cap-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========== 响应式 ========== */
@media (max-width: 1400px) {
  .bottom-grid {
    grid-template-columns: 1fr 1fr;
  }
  .bottom-grid .card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .mid-grid { grid-template-columns: 1fr; }
  .cap-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root {
    --header-h: 56px;
  }

  .show-mobile-only {
    display: flex !important;
  }

  .menu-btn {
    display: flex;
  }

  .hide-mobile {
    display: none !important;
  }

  .topbar {
    padding-left: 12px;
    padding-right: 12px;
    gap: 8px;
  }

  .topbar-brand {
    min-width: 0;
    flex: 1;
    overflow: hidden;
  }

  .brand-text h1 {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand-text p {
    display: none;
  }

  .brand-logo {
    width: 36px;
    height: 36px;
  }

  .topbar-search {
    display: none;
  }

  .topbar-actions {
    gap: 6px;
    flex-shrink: 0;
  }

  .btn-new-task {
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
  }

  .icon-btn {
    width: 40px;
    height: 40px;
  }

  .notify-panel {
    position: fixed;
    left: 16px;
    right: 16px;
    top: calc(var(--header-h) + var(--safe-top) + 8px);
    width: auto;
    max-height: 60vh;
  }

  /* 侧边栏抽屉 */
  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 35, 80, 0.45);
    z-index: 140;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
  }

  .sidebar-overlay.open {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    width: min(280px, 85vw);
    z-index: 150;
    box-shadow: var(--shadow-md);
    height: calc(100vh - var(--safe-top));
    top: var(--safe-top);
    padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom));
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-header-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 15px;
  }

  .sidebar-footer {
    display: none;
  }

  .sidebar-mobile-footer {
    display: block;
    margin-top: auto;
    padding: 16px;
    border-top: 1px solid var(--border);
    background: var(--bg);
  }

  .sidebar-mobile-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    min-width: 0;
  }

  .sidebar-mobile-user .user-avatar {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
  }

  .sidebar-mobile-user .user-name {
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sidebar-mobile-user .tenant-line {
    font-size: 11px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sidebar-mobile-footer .btn-outline {
    width: 100%;
    justify-content: center;
    height: 44px;
  }

  /* 底部导航 */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--bottom-nav-h) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: var(--card);
    border-top: 1px solid var(--border);
    z-index: 120;
    box-shadow: 0 -2px 12px rgba(15, 35, 80, 0.06);
  }

  .mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 4px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 10px;
    background: none;
    border: none;
    font-family: inherit;
    cursor: pointer;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-nav-item svg {
    width: 22px;
    height: 22px;
  }

  .mobile-nav-item.active {
    color: var(--primary);
    font-weight: 600;
  }

  .main {
    margin-left: 0;
    padding: 16px 14px calc(var(--bottom-nav-h) + var(--safe-bottom) + 20px);
  }

  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin-bottom: 20px;
  }

  .page-header > div:first-child {
    width: 100%;
  }

  .page-header h2 {
    font-size: 20px;
  }

  .page-header .btn-primary,
  #btnNewProject {
    width: 100%;
    justify-content: center;
    height: 44px;
  }

  .projects-toolbar .input-sm {
    width: 100%;
    min-width: 0;
  }

  .demo-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .demo-banner .btn-primary {
    width: 100%;
    height: 44px;
  }

  .project-card {
    padding: 16px;
  }

  .project-card h3 {
    font-size: 15px;
    line-height: 1.4;
  }

  .kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .kpi-grid-mini {
    grid-template-columns: 1fr 1fr;
  }

  .kpi-card {
    padding: 16px;
    flex-direction: column;
    gap: 10px;
  }

  .kpi-icon {
    width: 40px;
    height: 40px;
  }

  .kpi-body .value {
    font-size: 22px;
  }

  .mid-grid,
  .bottom-grid {
    grid-template-columns: 1fr;
  }

  .bottom-grid .card:last-child {
    grid-column: auto;
  }

  .cap-grid {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 16px;
  }

  .card-title {
    flex-wrap: wrap;
    gap: 10px;
  }

  .form-actions,
  .modal-actions {
    flex-direction: column-reverse;
  }

  .form-actions .btn-primary,
  .form-actions .btn-outline,
  .modal-actions .btn-primary,
  .modal-actions .btn-outline {
    width: 100%;
    justify-content: center;
    height: 44px;
  }

  .topic-item {
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px;
  }

  .topic-detail {
    width: 100%;
    text-align: right;
    padding-top: 4px;
  }

  .chart-donut-wrap {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .export-grid {
    grid-template-columns: 1fr;
  }

  .tabs,
  .data-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    margin-bottom: 16px;
    scrollbar-width: none;
  }

  .tabs::-webkit-scrollbar,
  .data-tabs::-webkit-scrollbar {
    display: none;
  }

  .tab-btn,
  .data-tabs button {
    flex-shrink: 0;
    white-space: nowrap;
    min-height: 40px;
  }

  .table-scroll {
    -webkit-overflow-scrolling: touch;
    margin-left: -14px;
    margin-right: -14px;
    padding-left: 14px;
    padding-right: 14px;
  }

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

  .data-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .markdown-preview {
    max-height: 50vh;
  }

  .login-wrap,
  .select-library-wrap {
    padding: 16px;
    max-width: 100%;
  }

  .login-card {
    padding: 28px 20px;
  }

  .login-brand h1 {
    font-size: 18px;
  }

  .select-library-header h1 {
    font-size: 18px;
  }

  .select-library-header p {
    font-size: 12px;
    line-height: 1.6;
  }

  .step-indicator {
    flex-wrap: wrap;
    gap: 6px;
  }

  .library-grid {
    max-height: none;
  }

  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  textarea,
  select,
  .login-card .form-group input {
    font-size: 16px;
  }

  .sms-row {
    flex-direction: column;
    align-items: stretch;
  }

  .sms-btn {
    width: 100%;
    height: 44px;
  }

  .login-page {
    align-items: flex-start;
    padding-top: calc(16px + var(--safe-top));
    padding-bottom: calc(16px + var(--safe-bottom));
  }

  .auth-tab {
    min-height: 44px;
  }

  .profile-card,
  .library-card {
    -webkit-tap-highlight-color: transparent;
  }

  .btn-back-step {
    width: 100%;
    min-height: 44px;
    margin-bottom: 12px;
    justify-content: center;
  }

  .modal-backdrop {
    padding: 12px;
    padding-top: calc(12px + var(--safe-top));
    padding-bottom: calc(12px + var(--safe-bottom));
  }

  .main {
    overflow-x: clip;
  }

  body[data-page="project"] .main {
    padding-top: 12px;
    padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 16px);
  }

  body[data-page="project"] .page-header {
    margin-bottom: 16px;
  }

  .page-header h2 {
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .data-toptabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .data-toptabs::-webkit-scrollbar {
    display: none;
  }

  .data-toptabs button {
    flex-shrink: 0;
    white-space: nowrap;
    min-height: 44px;
  }

  .data-subtabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .data-subtabs::-webkit-scrollbar {
    display: none;
  }

  .data-subtabs button {
    flex-shrink: 0;
    white-space: nowrap;
  }
}

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

@media (max-width: 480px) {
  .kpi-grid,
  .kpi-grid-mini {
    grid-template-columns: 1fr;
  }

  .brand-text h1 {
    font-size: 13px;
  }

  .page-header h2 {
    font-size: 18px;
  }
}

/* ========== 子页面通用 ========== */
.page-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.page-header .page-desc {
  margin-bottom: 0;
}

.loading-box, .error-box {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-secondary);
}

.error-box { color: #DC2626; }

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.content-block {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
}

.tab-btn.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}

.badge-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  background: var(--primary-light);
  color: var(--primary);
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

.markdown-preview {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  max-height: 600px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.8;
}

.markdown-preview h3 { font-size: 15px; margin: 16px 0 8px; color: var(--primary-dark); }
.markdown-preview h3:first-child { margin-top: 0; }

.empty-hint {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 14px;
}

.empty-hint a { color: var(--primary); }

/* ========== 登录页 ========== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #E8F0FE 0%, var(--bg) 50%, #E6F7F7 100%);
}

.login-wrap {
  width: 100%;
  max-width: 420px;
  padding: 24px;
}

.login-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 40px 36px;
  border: 1px solid var(--border);
}

.login-brand {
  text-align: center;
  margin-bottom: 32px;
}

.login-brand .brand-logo {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 14px;
}

.login-brand h1 {
  font-size: 20px;
  color: var(--text);
  margin-bottom: 8px;
}

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

.login-card .form-group {
  margin-bottom: 20px;
}

.login-card .form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.login-card .form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.login-card .form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.login-btn {
  width: 100%;
  height: 44px;
  font-size: 15px;
  margin-top: 8px;
}

.login-hint {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 20px;
}

.login-alert {
  font-size: 13px; color: #c62828; background: #ffebee; padding: 10px 12px;
  border-radius: 8px; margin-bottom: 14px;
}
.auth-tabs {
  display: flex; gap: 8px; margin-bottom: 16px;
}
.auth-tab {
  flex: 1; padding: 10px; border: 1px solid var(--border, #ddd); border-radius: 8px;
  background: #f8fafc; font-size: 14px; cursor: pointer;
}
.auth-tab.active {
  background: var(--primary, #1e5be0); color: #fff; border-color: var(--primary, #1e5be0);
}
.sms-row { display: flex; gap: 8px; }
.sms-row input { flex: 1; min-width: 0; }
.sms-btn { height: 42px; white-space: nowrap; padding: 0 12px; font-size: 13px; }

/* ========== 选馆工作台 ========== */
.select-library-wrap {
  max-width: 720px;
}

.select-library-header {
  text-align: center;
  margin-bottom: 28px;
}

.select-library-header h1 {
  font-size: 22px;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.select-library-header p {
  font-size: 13px;
  color: var(--text-muted);
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.profile-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.profile-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.profile-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 14px;
}

.profile-icon.pub { background: var(--primary-light); }
.profile-icon.uni { background: var(--purple-light); }

.profile-card h3 {
  font-size: 16px;
  margin-bottom: 6px;
  color: var(--text);
}

.profile-sub {
  font-size: 12px;
  color: var(--primary);
  margin-bottom: 10px;
}

.profile-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.profile-name {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg);
  padding: 4px 8px;
  border-radius: 4px;
}

.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 12px;
}

.step-indicator .step {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--border);
  color: var(--text-muted);
}

.step-indicator .step.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

.step-indicator .step.done {
  background: var(--primary-light);
  color: var(--primary);
}

.step-indicator .step-arrow {
  color: var(--text-muted);
  font-size: 11px;
}

.btn-back-step {
  margin-bottom: 16px;
  height: 32px;
  font-size: 13px;
}

.step2-hint {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.library-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
}

.library-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.library-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.library-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.library-card-head strong {
  font-size: 14px;
}

.library-card-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.tenant-badge {
  display: inline-block;
  font-size: 10px;
  background: var(--primary-light);
  color: var(--primary);
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
  font-weight: 600;
}

body.tenant-university .brand-logo {
  background: linear-gradient(135deg, #7C5CFF 0%, #5B3FD4 100%);
}

/* Toast 通知（替代散落的 alert） */
.toast-host {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: min(420px, calc(100vw - 32px));
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px 10px 14px;
  background: var(--bg-card, #ffffff);
  color: var(--text-primary, #1a1a1a);
  border: 1px solid var(--border, #e5e7eb);
  border-left-width: 3px;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  font-size: 13px;
  line-height: 1.5;
  animation: toast-in 180ms ease-out;
}

.toast-success { border-left-color: #10b981; }
.toast-error   { border-left-color: #dc2626; background: #fff5f5; color: #991b1b; }
.toast-info    { border-left-color: var(--primary, #2563eb); }
.toast-warning { border-left-color: #f59e0b; background: #fffbeb; color: #92400e; }

.toast-close {
  background: transparent;
  border: 0;
  font-size: 18px;
  line-height: 1;
  color: inherit;
  opacity: 0.5;
  cursor: pointer;
  padding: 0 2px;
  flex: 0 0 auto;
}
.toast-close:hover { opacity: 1; }

.toast-leave {
  animation: toast-out 200ms ease-in forwards;
}

@keyframes toast-in {
  from { transform: translateX(8px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes toast-out {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(8px); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .toast, .toast-leave { animation: none; }
}

/* === 共享工具类（2026-08-03 多页面内联样式收敛） === */

/* 显隐切换（配合 JS classList.toggle） */
.is-hidden { display: none !important; }

/* 列表行（knowledge / settings 通知 / projects 等） */
.list-row { padding: 12px; border-bottom: 1px solid var(--border); }
.list-row-desc { font-size: 12px; color: var(--text-secondary); margin-top: 6px; line-height: 1.5; }
.list-row-flex { padding: 12px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.list-row-flex > .list-row-main { flex: 1; min-width: 200px; }
.list-row-meta { font-size: 11px; color: var(--text-muted); margin-left: 8px; }

/* 通用小字 / 链接 */
.text-muted-sm { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.text-meta-13 { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin: 8px 0 0; }
.link-sm { font-size: 12px; color: var(--primary); }
.link-sm-d { font-size: 12px; color: var(--primary); display: inline-flex; text-decoration: none; height: 36px; align-items: center; padding: 0 16px; }

/* 间距工具 */
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.row-gap-8 { display: flex; align-items: center; gap: 8px; }
.text-muted-13 { font-size: 13px; color: var(--text-muted); }
.list-row.is-read { opacity: 0.6; }

/* 状态色（JS 渲染用） */
.text-ok-strong { color: #10B981; }
.text-bad-strong { color: #c62828; }
.text-warn-strong { color: #e65100; }
.text-info-strong { color: #1976d2; }
.text-accent-strong { color: #4f7cac; }

/* 锁定徽标（settings） */
.badge-locked { background: #10B981; color: #fff; padding: 4px 10px; border-radius: 12px; font-size: 12px; }

/* 32px 高按钮（projects demo / knowledge 场景） */
.btn-h32 { height: 32px; }
.btn-h32-shrink { height: 32px; flex-shrink: 0; }

/* 警示文字（select-library） */
.text-danger { color: #EF4444; }
.text-danger strong { color: #EF4444; }

/* n4-design / n6-analysis 页面专用补丁（页面 <style> 已定义主体，此处补内联残余） */
.n4-search-row { display: flex; gap: 8px; margin-top: 12px; align-items: center; }
.n4-search-input { flex: 1; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.n4-select-input { padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.n4-list-mt { margin-top: 16px; }
.n4-assess-hint { color: #666; font-size: 13px; }
.n4-assumptions-h { margin-top: 12px; }
.n4-assumptions-li { font-size: 13px; }
.n4-formula { margin-top: 8px; font-size: 12px; color: #666; }
.n4-method-count { color: #666; }
.n4-method-card { background: #f0f5fb; color: #1a1a2e; padding: 12px; }
.n4-method-en { font-size: 11px; color: #666; margin: 4px 0; }
.n4-method-desc { font-size: 12px; color: #333; margin: 4px 0; }
.n4-method-sample { font-size: 11px; color: #888; }
.n6-method-hint { color: #666; font-size: 13px; margin: 0; }
.n6-selected-hint { color: #4f7cac; font-weight: 500; }
.n6-applicable-hint { color: #666; font-size: 13px; }
.n6-run-meta { background: #f0f5fb; }
.n6-run-meta-p { font-size: 12px; color: #666; }
.n6-precheck-btn { margin-left: 8px; }

/* policy 页面卡片描述 */
.policy-card-desc { font-size: 13px; color: #374151; line-height: 1.6; margin: 8px 0 0; }
.policy-page-title { margin: 0; font-size: 18px; }
.demo-title { margin-left: 8px; font-size: 13px; }
.field-hint.modal-hint { margin: 0 0 16px; }

/* indicators 列表分组 */
.indicator-set { margin-bottom: 24px; }
.indicator-set-h { margin-bottom: 12px; }

/* === JS 注入样式收敛（api.js / data-preview / data-ext / projects / layout） === */

/* 错误友好 UI（api.js showErrorWithAction） */
.error-friendly .ef-tag { margin: 0 0 8px; color: var(--text-muted); }
.error-friendly .ef-title { margin: 0 0 12px; }
.error-friendly .ef-body { margin: 0 0 16px; color: var(--text-muted); font-size: 14px; line-height: 1.6; }
.error-friendly .ef-link { display: inline-block; text-decoration: none; padding: 8px 16px; background: var(--primary); color: white; border-radius: 4px; }
.error-friendly .ef-retry { margin-top: 12px; padding: 8px 16px; border: 1px solid #ccc; background: white; border-radius: 4px; cursor: pointer; }
.error-friendly .ef-retry-sm { padding: 6px 14px; border: 1px solid #ccc; background: white; border-radius: 4px; cursor: pointer; }
.error-friendly .ef-msg-bad { color: #c62828; margin: 0 0 12px; }

/* 柱状图（api.js renderBarChart） */
.chart-bar-cell { flex: 1; text-align: center; min-width: 48px; }
.chart-bar-track { height: 100px; display: flex; align-items: flex-end; justify-content: center; }
.chart-bar-fill { width: 70%; background: var(--primary); border-radius: 4px 4px 0 0; min-height: 4px; }
.chart-bar-label { font-size: 10px; color: var(--text-muted); margin-top: 6px; overflow: hidden; text-overflow: ellipsis; }
.chart-bar-val { font-size: 11px; font-weight: 600; }
.chart-title { font-weight: 600; margin-bottom: 12px; }
.chart-title-sm { font-weight: 600; margin-bottom: 8px; }
.chart-bars { display: flex; gap: 8px; align-items: flex-end; }
.chart-block { margin-bottom: 20px; }

/* 数据空态 / 加载更多（data-preview / data-ext） */
.data-empty-hint { color: var(--text-muted); margin-top: 12px; }
.more-wrap { text-align: center; padding: 12px; }
.more-loading { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.req-mark { color: #c62828; }

/* projects KPI 错误 / 空态 */
.kpi-error-val { font-size: 13px; color: #c62828; }
.proj-empty-hint { color: var(--text-muted); }
.proj-empty-hint a { color: var(--primary); }

/* layout 用户菜单 */
.min-w-0 { min-width: 0; }
