/* CueP · 项目+环节多作品 */
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif; }
.menu-item { display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;margin:0 .5rem;border-radius:.375rem;font-size:.875rem;color:#4b5563;border-left:3px solid transparent; }
.menu-item:hover { background:#f3f4f6; }
.menu-item.active { background:#eff6ff;color:#2563eb;border-left-color:#2563eb;font-weight:500; }
.menu-sub { padding-left:2.25rem;font-size:.8125rem; }
.menu-group-title { padding:.75rem 1rem .25rem;font-size:.75rem;color:#9ca3af; }
.tab-item { padding:.75rem 1rem;font-size:.875rem;color:#6b7280;border-bottom:2px solid transparent;white-space:nowrap; }
.tab-item.active { color:#2563eb;border-bottom-color:#2563eb;font-weight:500; }
.project-tabs { display:flex;border-bottom:1px solid #f0f0f0;background:#fff;padding:0 .5rem;font-size:.875rem;overflow-x:auto; }
.filter-bar { padding:12px 16px;display:flex;flex-wrap:wrap;gap:8px;align-items:center;border-bottom:1px solid #f0f0f0;background:#fafafa; }
.filter-input { height:32px;padding:0 10px;border:1px solid #d9d9d9;border-radius:4px;font-size:13px;background:#fff;min-width:120px; }
.filter-input.w-wide { min-width:160px; }
.btn-search { width:32px;height:32px;background:#2563eb;color:#fff;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0; }
.btn-refresh { width:32px;height:32px;border:1px solid #d9d9d9;border-radius:4px;background:#fff;color:#666;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0; }
.data-table th { background:#fafafa;color:#666;font-weight:500;font-size:12px;padding:10px 16px;text-align:left;border-bottom:1px solid #f0f0f0; }
.data-table td { padding:12px 16px;font-size:13px;border-bottom:1px solid #f5f5f5;color:#333;vertical-align:middle; }
.data-table tr:hover td { background:#fafafa; }
.tag { display:inline-block;padding:0 6px;font-size:12px;border-radius:2px;line-height:20px; }
.tag-green { background:#f6ffed;color:#52c41a;border:1px solid #b7eb8f; }
.tag-orange { background:#fff7e6;color:#fa8c16;border:1px solid #ffd591; }
.tag-gray { background:#f5f5f5;color:#8c8c8c;border:1px solid #d9d9d9; }
.tag-blue { background:#e6f7ff;color:#1890ff;border:1px solid #91d5ff; }
.tag-red { background:#fff2f0;color:#ff4d4f;border:1px solid #ffccc7; }
.tag-purple { background:#f9f0ff;color:#722ed1;border:1px solid #d3adf7; }
.tag-cyan { background:#e6fffb;color:#13c2c2;border:1px solid #87e8de; }
.state-unusable { background:#fff7e6;color:#d46b08; }
.state-usable { background:#e6f7ff;color:#0958d9; }
.ctx-bar { background:#f0f5ff;border-bottom:1px solid #d6e4ff;padding:8px 16px;font-size:12px;color:#595959; }
.ctx-bar a { color:#2563eb; }
.card-hover:hover { box-shadow:0 2px 8px rgba(0,0,0,.06); }
.proto-frame-wrap { height:480px;overflow:hidden;border:1px solid #e5e7eb;border-radius:8px;background:#fff; }
.proto-frame-wrap iframe { width:1280px;height:800px;border:0;transform:scale(.375);transform-origin:0 0;pointer-events:none; }
.canvas-grid { background-image:linear-gradient(#eee 1px,transparent 1px),linear-gradient(90deg,#eee 1px,transparent 1px);background-size:20px 20px; }
.material-card.disabled-overlay::after { content:'';position:absolute;inset:0;background:rgba(0,0,0,.04);pointer-events:none; }
.module-card { background:#fff;border:1px solid #f0f0f0;border-radius:8px;padding:16px; }
.overview-hero { background:linear-gradient(135deg,#1e3a5f 0%,#2563eb 55%,#3b82f6 100%); }
.stat-ring { width:56px;height:56px;border-radius:50%;background:conic-gradient(#f97316 0 45%,#e5e7eb 45% 100%);display:flex;align-items:center;justify-content:center; }
.stat-ring-inner { width:44px;height:44px;border-radius:50%;background:#fff;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:600;color:#ea580c; }
.pipeline-step { flex:1;min-width:72px;text-align:center;position:relative; }
.pipeline-step::after { content:'';position:absolute;top:14px;left:calc(50% + 20px);width:calc(100% - 40px);height:2px;background:#e5e7eb;z-index:0; }
.pipeline-step:last-child::after { display:none; }
.pipeline-step.done::after { background:#86efac; }
.pipeline-step.active::after { background:linear-gradient(90deg,#93c5fd 50%,#e5e7eb 50%); }
.pipeline-dot { width:28px;height:28px;border-radius:50%;margin:0 auto 6px;display:flex;align-items:center;justify-content:center;font-size:11px;position:relative;z-index:1;border:2px solid #e5e7eb;background:#fff;color:#9ca3af; }
.pipeline-step.done .pipeline-dot { background:#dcfce7;border-color:#22c55e;color:#16a34a; }
.pipeline-step.active .pipeline-dot { background:#2563eb;border-color:#2563eb;color:#fff;box-shadow:0 0 0 4px rgba(37,99,235,.2); }
.cost-bar-row { display:flex;align-items:center;gap:8px;font-size:12px; }
.cost-bar-track { flex:1;height:8px;background:#f3f4f6;border-radius:4px;overflow:hidden; }
.cost-bar-fill { height:100%;border-radius:4px; }
.member-avatar-stack img { width:28px;height:28px;border-radius:50%;border:2px solid #fff;margin-left:-8px; }
.member-avatar-stack img:first-child { margin-left:0; }
.todo-priority-high { width:6px;height:6px;border-radius:50%;background:#ef4444;margin-top:6px;flex-shrink:0; }
.todo-priority-mid { width:6px;height:6px;border-radius:50%;background:#f59e0b;margin-top:6px;flex-shrink:0; }
.todo-priority-low { width:6px;height:6px;border-radius:50%;background:#3b82f6;margin-top:6px;flex-shrink:0; }
.activity-line { position:relative;padding-left:20px; }
.activity-line::before { content:'';position:absolute;left:5px;top:8px;bottom:-12px;width:2px;background:#e5e7eb; }
.activity-line:last-child::before { display:none; }
.activity-dot { position:absolute;left:0;top:6px;width:12px;height:12px;border-radius:50%;background:#fff;border:2px solid #2563eb; }
.quick-op-btn { display:flex;flex-direction:column;align-items:center;gap:4px;padding:10px 6px;border:1px solid #f0f0f0;border-radius:8px;font-size:12px;color:#374151;transition:all .15s; }
.quick-op-btn:hover { border-color:#93c5fd;background:#eff6ff;color:#2563eb; }
.quick-op-btn i { font-size:16px;color:#2563eb; }
/* 统一创作 · 白色工作室 */
.studio-app { background:#f5f5f5; }
.studio-top { height:48px;background:#fff;border-bottom:1px solid #e8e8e8;display:flex;align-items:center;justify-content:space-between;padding:0 16px;flex-shrink:0; }
.studio-project-select { min-width:200px;height:32px;border:1px solid #d9d9d9;border-radius:6px;padding:0 10px;font-size:13px;background:#fff; }
.studio-panel-left { width:280px;background:#fff;border-right:1px solid #e8e8e8;overflow-y:auto;flex-shrink:0; }
.studio-panel-right { flex:1;background:#fafafa;overflow:auto;display:flex;flex-direction:column; }
.studio-label { font-size:12px;color:#8c8c8c;margin-bottom:6px;display:block; }
.studio-field { width:100%;border:1px solid #d9d9d9;border-radius:6px;padding:8px 10px;font-size:13px;background:#fff; }
.studio-field:focus { outline:none;border-color:#2563eb;box-shadow:0 0 0 2px rgba(37,99,235,.12); }
.studio-btn-generate { width:100%;height:40px;background:#22c55e;color:#fff;border:none;border-radius:8px;font-size:14px;font-weight:600;cursor:pointer; }
.studio-btn-generate:hover { background:#16a34a; }
.studio-ref-btns { display:grid;grid-template-columns:1fr 1fr;gap:8px; }
.studio-ref-btn { border:1px dashed #d9d9d9;border-radius:8px;padding:12px;text-align:center;font-size:12px;color:#666;background:#fafafa;cursor:pointer; }
.studio-ref-btn:hover { border-color:#2563eb;color:#2563eb;background:#eff6ff; }
.studio-result-grid { display:grid;grid-template-columns:repeat(5,1fr);gap:8px;padding:16px; }
.studio-result-item { aspect-ratio:1;border-radius:6px;overflow:hidden;border:1px solid #e8e8e8;background:#fff;position:relative; }
.studio-result-item img { width:100%;height:100%;object-fit:cover; }
.studio-result-name { position:absolute;bottom:0;left:0;right:0;background:rgba(0,0,0,.5);color:#fff;font-size:9px;padding:2px 4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.canvas-workspace { flex:1;position:relative;overflow:hidden;background:#f0f0f0;background-image:radial-gradient(#d4d4d4 1px,transparent 1px);background-size:16px 16px; }
.canvas-tool-rail { width:48px;background:#fff;border-right:1px solid #e8e8e8;display:flex;flex-direction:column;align-items:center;padding:8px 0;gap:4px;flex-shrink:0; }
.canvas-tool-btn { width:36px;height:36px;border-radius:8px;display:flex;align-items:center;justify-content:center;color:#666;font-size:15px;cursor:pointer;border:none;background:transparent; }
.canvas-tool-btn:hover,.canvas-tool-btn.active { background:#ecfdf5;color:#16a34a; }
.canvas-tool-btn.add { background:#22c55e;color:#fff; }
.canvas-node { background:#fff;border:1px solid #e0e0e0;border-radius:10px;padding:12px;box-shadow:0 2px 8px rgba(0,0,0,.06);min-width:200px;font-size:12px; }
.canvas-node-prompt { min-height:72px;color:#999; }
.canvas-node-line { stroke:#3b82f6;stroke-width:2;fill:none; }
.canvas-float-panel { position:absolute;top:16px;left:50%;transform:translateX(-50%);background:#fff;border:1px solid #e8e8e8;border-radius:10px;padding:12px 16px;box-shadow:0 4px 16px rgba(0,0,0,.08);z-index:10;display:flex;gap:8px;align-items:center;flex-wrap:wrap; }
.canvas-ratio-btn { padding:4px 10px;border:1px solid #e8e8e8;border-radius:6px;font-size:12px;background:#fff;cursor:pointer; }
.canvas-ratio-btn.active { border-color:#22c55e;background:#ecfdf5;color:#16a34a; }
.canvas-ai-panel { width:320px;background:#fff;border-left:1px solid #e8e8e8;display:flex;flex-direction:column;flex-shrink:0; }
.edit-timeline { height:120px;background:#fff;border-top:1px solid #e8e8e8;padding:8px 12px; }
.edit-track { height:28px;background:#f5f5f5;border-radius:4px;margin-top:6px;position:relative;border:1px solid #e8e8e8; }
.edit-clip { position:absolute;height:22px;top:2px;background:#93c5fd;border-radius:3px;border:1px solid #3b82f6;font-size:10px;padding:0 6px;color:#1e40af;line-height:20px; }
.create-card { background:#fff;border:1px solid #f0f0f0;border-radius:12px;padding:24px;text-align:center;transition:all .2s;display:block; }
.create-card:hover { border-color:#93c5fd;box-shadow:0 8px 24px rgba(37,99,235,.1);transform:translateY(-2px); }
.create-card-icon { width:56px;height:56px;border-radius:14px;margin:0 auto 12px;display:flex;align-items:center;justify-content:center;font-size:24px; }
.points-mode-tab.active { background:#2563eb;color:#fff; }
.review-pin { position:absolute;bottom:12px;width:10px;height:10px;background:#fbbf24;border:2px solid #fff;border-radius:50%;transform:translateX(-50%);cursor:pointer;z-index:5; }
.review-pin.active { background:#2563eb;width:12px;height:12px; }
.review-comment-card { border:1px solid #e8e8e8;border-radius:10px;padding:12px;background:#fff; }
.review-time-badge { display:inline-block;font-size:11px;font-weight:600;padding:2px 8px;background:#f3f4f6;color:#374151;border-radius:4px;font-family:ui-monospace,monospace; }
.review-time-range { background:#dbeafe;color:#1d4ed8; }
.review-range-bar { position:absolute;top:50%;transform:translateY(-50%);height:8px;background:rgba(37,99,235,.35);border-radius:4px;border:1px solid #3b82f6;pointer-events:none;z-index:4; }
.review-range-bar.writer { background:rgba(124,58,237,.3);border-color:#7c3aed; }
.modal-overlay { position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:100;display:flex;align-items:center;justify-content:center;padding:24px; }
.modal-overlay.hidden { display:none; }
.modal-dialog { background:#fff;border-radius:12px;width:100%;max-width:640px;max-height:90vh;overflow:hidden;box-shadow:0 20px 50px rgba(0,0,0,.15);display:flex;flex-direction:column; }
.modal-header { padding:16px 20px;border-bottom:1px solid #f0f0f0;display:flex;justify-content:space-between;align-items:center; }
.modal-body { padding:20px;overflow-y:auto;flex:1; }
.modal-footer { padding:12px 20px;border-top:1px solid #f0f0f0;display:flex;justify-content:space-between;background:#fafafa; }
.modal-step-dot { width:28px;height:28px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:600;border:2px solid #e5e7eb;color:#9ca3af;background:#fff; }
.modal-step-dot.active { border-color:#2563eb;background:#2563eb;color:#fff; }
.modal-step-dot.done { border-color:#22c55e;background:#ecfdf5;color:#16a34a; }
.modal-step-line { flex:1;height:2px;background:#e5e7eb;align-self:center;margin:0 4px;max-width:48px; }
.modal-step-line.done { background:#86efac; }
.prod-matrix th,.prod-matrix td { font-size:12px;padding:10px 12px;border-bottom:1px solid #f5f5f5; }
.prod-matrix th { background:#fafafa;color:#666;font-weight:500;text-align:left; }
.prod-status { display:inline-block;padding:2px 8px;border-radius:4px;font-size:11px;white-space:nowrap; }
.prod-done { background:#f6ffed;color:#52c41a;border:1px solid #b7eb8f; }
.prod-doing { background:#e6f7ff;color:#0958d9;border:1px solid #91d5ff; }
.prod-todo { background:#f5f5f5;color:#8c8c8c;border:1px solid #d9d9d9; }
.prod-wait { background:#fff7e6;color:#d46b08;border:1px solid #ffd591; }
.prod-na { color:#d9d9d9; }
.detail-page-header { height:48px;background:#fff;border-bottom:1px solid #f0f0f0; }
.app-topbar-select { height:32px;border:1px solid #e5e7eb;border-radius:6px;padding:0 8px;font-size:12px;background:#fff;color:#374151; }
.app-topbar-icon { width:32px;height:32px;border-radius:6px;border:1px solid transparent;background:transparent;color:#6b7280;display:inline-flex;align-items:center;justify-content:center;cursor:pointer; }
.app-topbar-icon:hover { background:#f3f4f6;color:#374151; }
.app-user-menu { position:absolute;right:0;top:calc(100% + 6px);width:220px;background:#fff;border:1px solid #e5e7eb;border-radius:8px;box-shadow:0 10px 30px rgba(0,0,0,.12);z-index:50;padding:4px 0; }
.app-user-menu-item { display:flex;align-items:center;gap:8px;padding:10px 14px;font-size:13px;color:#374151; }
.app-user-menu-item:hover { background:#f9fafb; }
.page-breadcrumb { min-height:40px;display:flex;align-items:center;padding:0 16px;background:#fff;border-bottom:1px solid #f0f0f0;font-size:13px;color:#6b7280; }
.page-breadcrumb a { color:#2563eb; }
.page-toolbar { display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 16px;background:#fafafa;border-bottom:1px solid #f0f0f0;flex-wrap:wrap; }
.page-toolbar-title { font-size:13px;font-weight:500;color:#374151; }
.page-toolbar-actions { display:flex;flex-wrap:wrap;gap:8px;margin-left:auto; }

/* ========== Dark theme · 夜间模式（参考 GitHub / Linear 分层对比） ========== */
html.theme-dark {
  color-scheme: dark;
  --dm-page: #0b0f14;
  --dm-canvas: #10161f;
  --dm-elevated: #1a222d;
  --dm-raised: #222c3a;
  --dm-inset: #151c26;
  --dm-hover: #2a3544;
  --dm-active: #324055;
  --dm-border: #2f3b4a;
  --dm-border-light: #3d4d61;
  --dm-text: #eef2f6;
  --dm-text-secondary: #c2cad4;
  --dm-text-muted: #93a0ae;
  --dm-link: #6eb1ff;
  --dm-link-hover: #9ac7ff;
  --dm-accent: #3b82f6;
  --dm-accent-soft: rgba(59, 130, 246, 0.18);
  --dm-success: #3fb950;
  --dm-warning: #e3b341;
  --dm-danger: #f85149;
}

/* 页面底色 */
html.theme-dark body,
html.theme-dark .bg-gray-50,
html.theme-dark .bg-gray-100,
html.theme-dark .studio-app,
html.theme-dark .page-toolbar {
  background: var(--dm-page) !important;
  color: var(--dm-text);
}

/* 内容卡片 / 面板 — 比页面略亮，突出主体 */
html.theme-dark .bg-white,
html.theme-dark .detail-basic-card,
html.theme-dark .metric-card,
html.theme-dark .chart-card,
html.theme-dark .module-card,
html.theme-dark .create-card,
html.theme-dark .review-comment-card,
html.theme-dark .modal-dialog {
  background: var(--dm-elevated) !important;
  border-color: var(--dm-border) !important;
}

html.theme-dark .app-topbar,
html.theme-dark .page-breadcrumb,
html.theme-dark #app-sidebar,
html.theme-dark .project-tabs,
html.theme-dark .filter-bar,
html.theme-dark .modal-header,
html.theme-dark .modal-footer,
html.theme-dark .studio-top,
html.theme-dark .studio-panel-left,
html.theme-dark .canvas-tool-rail,
html.theme-dark .canvas-ai-panel,
html.theme-dark .edit-timeline {
  background: var(--dm-elevated) !important;
  border-color: var(--dm-border) !important;
}

html.theme-dark .page-breadcrumb,
html.theme-dark .page-toolbar-title,
html.theme-dark .app-topbar { color: var(--dm-text-secondary); }

/* 卡片内分区头 / 表头 */
html.theme-dark [class~="bg-gray-50"],
html.theme-dark [class*="bg-gray-50/"],
html.theme-dark .data-table th,
html.theme-dark .prod-matrix th,
html.theme-dark .modal-footer {
  background: var(--dm-raised) !important;
  border-color: var(--dm-border) !important;
}

html.theme-dark .data-table td,
html.theme-dark .prod-matrix td {
  color: var(--dm-text-secondary) !important;
  border-color: var(--dm-border) !important;
}
html.theme-dark .data-table th,
html.theme-dark .prod-matrix th {
  color: var(--dm-text-muted) !important;
}
html.theme-dark .data-table tr:hover td,
html.theme-dark .prod-matrix tbody tr:hover td {
  background: var(--dm-hover) !important;
}

/* 文字层级 */
html.theme-dark .text-gray-900,
html.theme-dark .text-gray-800,
html.theme-dark .text-gray-700,
html.theme-dark .font-semibold,
html.theme-dark .font-medium,
html.theme-dark .font-bold:not([class*="text-"]),
html.theme-dark strong {
  color: var(--dm-text) !important;
}
html.theme-dark .text-gray-600,
html.theme-dark .text-gray-500 {
  color: var(--dm-text-secondary) !important;
}
html.theme-dark .text-gray-400,
html.theme-dark .text-gray-300 {
  color: var(--dm-text-muted) !important;
}

/* 链接与强调色 — 提亮保证可读 */
html.theme-dark a.text-blue-600,
html.theme-dark .text-blue-600,
html.theme-dark .page-breadcrumb a,
html.theme-dark .ctx-bar a {
  color: var(--dm-link) !important;
}
html.theme-dark a.text-blue-600:hover,
html.theme-dark .page-breadcrumb a:hover {
  color: var(--dm-link-hover) !important;
}
html.theme-dark .text-green-600,
html.theme-dark .text-green-700 { color: #4ade80 !important; }
html.theme-dark .text-orange-500,
html.theme-dark .text-orange-600 { color: #fb923c !important; }
html.theme-dark .text-red-600 { color: #f87171 !important; }
html.theme-dark .text-purple-600 { color: #c084fc !important; }
html.theme-dark .text-pink-600 { color: #f472b6 !important; }
html.theme-dark .text-indigo-600,
html.theme-dark .text-indigo-500 { color: #818cf8 !important; }
html.theme-dark .text-amber-600,
html.theme-dark .text-amber-900 { color: #fbbf24 !important; }

/* 浅色底块 → 半透明色块（保留语义、避免白底黑字） */
html.theme-dark .bg-blue-50,
html.theme-dark .bg-blue-50\/30,
html.theme-dark [class*="bg-blue-50"] { background: rgba(59, 130, 246, 0.14) !important; }
html.theme-dark .bg-purple-50 { background: rgba(168, 85, 247, 0.14) !important; }
html.theme-dark .bg-pink-50 { background: rgba(236, 72, 153, 0.14) !important; }
html.theme-dark .bg-indigo-50 { background: rgba(99, 102, 241, 0.14) !important; }
html.theme-dark .bg-green-50,
html.theme-dark .bg-green-50\/30,
html.theme-dark [class*="bg-green-50"] { background: rgba(34, 197, 94, 0.12) !important; }
html.theme-dark .bg-amber-50 {
  background: rgba(245, 158, 11, 0.12) !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
  color: #fcd34d !important;
}
html.theme-dark .bg-gray-100 { background: var(--dm-raised) !important; }
html.theme-dark .border-amber-200 { border-color: rgba(245, 158, 11, 0.35) !important; }
html.theme-dark .border-green-200 { border-color: rgba(34, 197, 94, 0.35) !important; }

/* 边框 */
html.theme-dark .border,
html.theme-dark .border-b,
html.theme-dark .border-t,
html.theme-dark .border-r,
html.theme-dark [class*="border-gray"] {
  border-color: var(--dm-border) !important;
}
html.theme-dark .divide-y > * + * {
  border-color: var(--dm-border) !important;
}

/* 标签 / 状态徽章 */
html.theme-dark .tag-green,
html.theme-dark .prod-done {
  background: rgba(46, 160, 67, 0.18) !important;
  color: #3fb950 !important;
  border-color: rgba(63, 185, 80, 0.45) !important;
}
html.theme-dark .tag-orange,
html.theme-dark .prod-wait,
html.theme-dark .state-unusable {
  background: rgba(210, 153, 34, 0.18) !important;
  color: #e3b341 !important;
  border-color: rgba(227, 179, 65, 0.45) !important;
}
html.theme-dark .tag-blue,
html.theme-dark .prod-doing,
html.theme-dark .state-usable {
  background: rgba(56, 139, 253, 0.18) !important;
  color: #58a6ff !important;
  border-color: rgba(88, 166, 255, 0.45) !important;
}
html.theme-dark .tag-gray,
html.theme-dark .prod-todo {
  background: rgba(139, 148, 158, 0.15) !important;
  color: #b1bac4 !important;
  border-color: rgba(139, 148, 158, 0.35) !important;
}
html.theme-dark .tag-red {
  background: rgba(248, 81, 73, 0.18) !important;
  color: #f85149 !important;
  border-color: rgba(248, 81, 73, 0.45) !important;
}
html.theme-dark .tag-purple {
  background: rgba(163, 113, 247, 0.18) !important;
  color: #bc8cff !important;
  border-color: rgba(188, 140, 255, 0.45) !important;
}
html.theme-dark .tag-cyan {
  background: rgba(57, 197, 207, 0.18) !important;
  color: #56d4dd !important;
  border-color: rgba(86, 212, 221, 0.45) !important;
}
html.theme-dark .prod-na { color: var(--dm-text-muted) !important; }

/* 表单 / 筛选 */
html.theme-dark .filter-input,
html.theme-dark .app-topbar-select,
html.theme-dark .studio-field,
html.theme-dark .studio-project-select,
html.theme-dark select,
html.theme-dark input:not([type="checkbox"]):not([type="radio"]),
html.theme-dark textarea {
  background: var(--dm-inset) !important;
  border-color: var(--dm-border-light) !important;
  color: var(--dm-text) !important;
}
html.theme-dark .filter-input::placeholder,
html.theme-dark textarea::placeholder {
  color: var(--dm-text-muted) !important;
}
html.theme-dark .btn-refresh {
  background: var(--dm-raised) !important;
  border-color: var(--dm-border-light) !important;
  color: var(--dm-text-secondary) !important;
}
html.theme-dark .btn-search { background: var(--dm-accent) !important; }

/* 按钮 */
html.theme-dark .page-toolbar-actions button.border,
html.theme-dark button.border.rounded,
html.theme-dark .btn-refresh,
html.theme-dark .canvas-ratio-btn,
html.theme-dark .quick-op-btn,
html.theme-dark .detail-subnav a,
html.theme-dark .prod-module-actions a:not(.primary),
html.theme-dark .studio-ref-btn {
  background: var(--dm-raised) !important;
  border-color: var(--dm-border-light) !important;
  color: var(--dm-text-secondary) !important;
}
html.theme-dark .page-toolbar-actions button.border:hover,
html.theme-dark button.border.rounded:hover,
html.theme-dark .quick-op-btn:hover,
html.theme-dark .detail-subnav a:hover,
html.theme-dark .prod-module-actions a:not(.primary):hover,
html.theme-dark .studio-ref-btn:hover {
  background: var(--dm-hover) !important;
  border-color: var(--dm-link) !important;
  color: var(--dm-link) !important;
}
html.theme-dark .prod-module-actions a.primary,
html.theme-dark .bg-blue-600,
html.theme-dark .bg-green-600,
html.theme-dark button.bg-blue-600 {
  background: var(--dm-accent) !important;
  border-color: #2563eb !important;
  color: #fff !important;
}
html.theme-dark .quick-op-btn i { color: var(--dm-link) !important; }

/* 侧栏 */
html.theme-dark #app-sidebar .font-bold { color: var(--dm-text) !important; }
html.theme-dark .menu-group-title { color: var(--dm-text-muted) !important; }
html.theme-dark .menu-item { color: var(--dm-text-secondary) !important; }
html.theme-dark .menu-item:hover { background: var(--dm-hover) !important; color: var(--dm-text) !important; }
html.theme-dark .menu-item.active {
  background: var(--dm-accent-soft) !important;
  color: var(--dm-link) !important;
  border-left-color: var(--dm-link) !important;
}

/* 顶栏 */
html.theme-dark .app-topbar-icon { color: var(--dm-text-muted) !important; }
html.theme-dark .app-topbar-icon:hover { background: var(--dm-hover) !important; color: var(--dm-text) !important; }
html.theme-dark .app-topbar-user { color: var(--dm-text-secondary) !important; }
html.theme-dark .app-topbar-user:hover { background: var(--dm-hover) !important; }
html.theme-dark .app-user-menu {
  background: var(--dm-elevated) !important;
  border-color: var(--dm-border) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45) !important;
}
html.theme-dark .app-user-menu-item { color: var(--dm-text-secondary) !important; }
html.theme-dark .app-user-menu-item:hover { background: var(--dm-hover) !important; color: var(--dm-text) !important; }
html.theme-dark .app-user-menu .border-b { border-color: var(--dm-border) !important; }

/* 页签 */
html.theme-dark .tab-item { color: var(--dm-text-muted) !important; }
html.theme-dark .tab-item.active { color: var(--dm-link) !important; border-bottom-color: var(--dm-link) !important; }
html.theme-dark .project-tabs { box-shadow: none !important; }

/* 列表 hover */
html.theme-dark .hover\:bg-gray-50:hover,
html.theme-dark li.hover\:bg-gray-50:hover {
  background: var(--dm-hover) !important;
}
html.theme-dark .hover\:text-blue-600:hover {
  color: var(--dm-link) !important;
}

/* 进度 / 图表 */
html.theme-dark .cost-bar-track,
html.theme-dark .h-1\.5.bg-gray-100 {
  background: var(--dm-inset) !important;
}
html.theme-dark .chart-line-wrap { border-color: var(--dm-border) !important; }
html.theme-dark .chart-donut-hole {
  background: var(--dm-elevated) !important;
  color: var(--dm-text-secondary) !important;
}
html.theme-dark .chart-legend { color: var(--dm-text-muted) !important; }
html.theme-dark .stat-ring-inner {
  background: var(--dm-elevated) !important;
  color: #fb923c !important;
}

/* 动态时间线 */
html.theme-dark .activity-line::before { background: var(--dm-border) !important; }
html.theme-dark .activity-dot { background: var(--dm-elevated) !important; border-color: var(--dm-link) !important; }

/* 成员头像叠放 */
html.theme-dark .member-avatar-stack img,
html.theme-dark .member-avatar-stack span {
  border-color: var(--dm-elevated) !important;
}

/* 信息条 */
html.theme-dark .ctx-bar {
  background: var(--dm-accent-soft) !important;
  border-color: rgba(59, 130, 246, 0.35) !important;
  color: var(--dm-text-secondary) !important;
}
html.theme-dark .bg-blue-50.border-blue-100 {
  background: rgba(59, 130, 246, 0.12) !important;
  border-color: rgba(59, 130, 246, 0.35) !important;
  color: var(--dm-text-secondary) !important;
}

/* Modal */
html.theme-dark .modal-overlay { background: rgba(0, 0, 0, 0.65) !important; }
html.theme-dark .modal-step-dot {
  background: var(--dm-raised) !important;
  border-color: var(--dm-border-light) !important;
  color: var(--dm-text-muted) !important;
}
html.theme-dark .modal-step-dot.active {
  background: var(--dm-accent) !important;
  border-color: var(--dm-accent) !important;
  color: #fff !important;
}
html.theme-dark .modal-step-dot.done {
  background: rgba(34, 197, 94, 0.15) !important;
  border-color: #22c55e !important;
  color: #4ade80 !important;
}
html.theme-dark .modal-step-line { background: var(--dm-border) !important; }
html.theme-dark .modal-step-line.done { background: rgba(34, 197, 94, 0.5) !important; }
html.theme-dark .points-mode-tab { background: var(--dm-raised) !important; color: var(--dm-text-muted) !important; }
html.theme-dark .points-mode-tab.active { background: var(--dm-accent) !important; color: #fff !important; }

/* 工作室 / 画布 */
html.theme-dark .studio-panel-right,
html.theme-dark .studio-app .bg-white {
  background: var(--dm-canvas) !important;
}
html.theme-dark .studio-label { color: var(--dm-text-muted) !important; }
html.theme-dark .canvas-workspace {
  background-color: var(--dm-inset) !important;
  background-image: radial-gradient(var(--dm-border) 1px, transparent 1px) !important;
}
html.theme-dark .canvas-node {
  background: var(--dm-elevated) !important;
  border-color: var(--dm-border-light) !important;
  color: var(--dm-text-secondary) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
}
html.theme-dark .canvas-node-prompt { color: var(--dm-text-muted) !important; }
html.theme-dark .canvas-float-panel {
  background: var(--dm-elevated) !important;
  border-color: var(--dm-border) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}
html.theme-dark .canvas-ratio-btn.active {
  background: rgba(34, 197, 94, 0.15) !important;
  border-color: #22c55e !important;
  color: #4ade80 !important;
}
html.theme-dark .canvas-tool-btn { color: var(--dm-text-muted) !important; }
html.theme-dark .canvas-tool-btn:hover,
html.theme-dark .canvas-tool-btn.active {
  background: rgba(34, 197, 94, 0.15) !important;
  color: #4ade80 !important;
}
html.theme-dark .edit-track {
  background: var(--dm-inset) !important;
  border-color: var(--dm-border) !important;
}
html.theme-dark .edit-clip {
  background: rgba(59, 130, 246, 0.35) !important;
  border-color: var(--dm-link) !important;
  color: var(--dm-text) !important;
}

/* 审片 */
html.theme-dark .review-time-badge {
  background: var(--dm-raised) !important;
  color: var(--dm-text-secondary) !important;
}
html.theme-dark .review-time-range {
  background: var(--dm-accent-soft) !important;
  color: var(--dm-link) !important;
}

/* 概览 hero 保留渐变，文字保持高对比 */
html.theme-dark .overview-hero { opacity: 0.95; }

/* 阴影弱化，避免夜间脏边 */
html.theme-dark .shadow-sm { box-shadow: none !important; }

/* 分隔线 / 占位 */
html.theme-dark .bg-gray-200,
html.theme-dark .w-px.bg-gray-200 { background: var(--dm-border) !important; }
html.theme-dark img.border-gray-200 { border-color: var(--dm-border) !important; }

/* 积分弹窗等 textarea 透明底 */
html.theme-dark textarea.bg-transparent { background: transparent !important; }

.detail-basic-card { background:#fff;border:1px solid #f0f0f0;border-radius:8px;padding:20px; }
.detail-subnav { display:flex;flex-wrap:wrap;gap:8px; }
.detail-subnav a { display:inline-flex;align-items:center;gap:6px;padding:8px 14px;background:#fff;border:1px solid #e8e8e8;border-radius:8px;font-size:13px;color:#374151;transition:all .15s; }
.detail-subnav a:hover { border-color:#93c5fd;color:#2563eb;background:#eff6ff; }
.detail-subnav a i { color:#6b7280;font-size:12px; }
.detail-subnav a:hover i { color:#2563eb; }
.prod-module-col { padding:16px 20px;border-right:1px solid #f0f0f0; }
.prod-module-col:last-child { border-right:none; }
.prod-module-actions { display:flex;flex-wrap:wrap;gap:8px;margin-top:12px; }
.prod-module-actions a { font-size:12px;padding:4px 10px;border:1px solid #e8e8e8;border-radius:4px;color:#2563eb;background:#fff; }
.prod-module-actions a:hover { background:#eff6ff;border-color:#93c5fd; }
.prod-module-actions a.primary { background:#2563eb;color:#fff;border-color:#2563eb; }
.metric-card { background:#fff;border:1px solid #f0f0f0;border-radius:8px;padding:16px;height:100%; }
.chart-card { background:#fff;border:1px solid #f0f0f0;border-radius:8px;padding:16px; }
.chart-line-wrap { height:140px;display:flex;align-items:flex-end;gap:8px;padding-top:8px;border-bottom:1px solid #f0f0f0; }
.chart-line-bar { flex:1;background:linear-gradient(180deg,#93c5fd 0%,#2563eb 100%);border-radius:4px 4px 0 0;min-height:8px;position:relative; }
.chart-line-bar span { position:absolute;bottom:100%;left:50%;transform:translateX(-50%);font-size:9px;color:#9ca3af;margin-bottom:4px;white-space:nowrap; }
.chart-donut { width:120px;height:120px;border-radius:50%;background:conic-gradient(#6366f1 0 50%,#3b82f6 50% 81%,#ec4899 81% 100%);margin:0 auto;position:relative; }
.chart-donut-hole { position:absolute;inset:24px;background:#fff;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:11px;color:#666;text-align:center;line-height:1.3; }
.chart-legend { display:flex;flex-wrap:wrap;gap:12px;justify-content:center;margin-top:12px;font-size:11px;color:#666; }
.chart-legend i { display:inline-block;width:8px;height:8px;border-radius:2px;margin-right:4px;vertical-align:middle; }
button.quick-op-btn { cursor:pointer;border:none;font-family:inherit;width:100%; }
.points-op-btn { cursor:pointer; }
