.yili-workspace-nav {
  display: grid;
  gap: 4px;
  margin: 0 0 13px;
}
.yili-workspace-link {
  min-height: 48px;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #aaa6b3;
  text-decoration: none;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.yili-workspace-link:hover {
  color: #f3f0f8;
  border-color: rgba(139, 92, 246, .34);
  background: rgba(139, 92, 246, .08);
}
.yili-workspace-link.active {
  color: #f7f3ff;
  border-color: rgba(139, 92, 246, .48);
  background: linear-gradient(90deg, rgba(124, 58, 237, .18), rgba(124, 58, 237, .04));
}
.yili-workspace-code {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(139, 92, 246, .28);
  border-radius: 7px;
  color: #a78bfa;
  background: rgba(139, 92, 246, .06);
  font: 800 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.yili-workspace-copy { min-width: 0; line-height: 1.2; }
.yili-workspace-copy strong { display: block; color: inherit; font-size: 12px; font-weight: 720; }
.yili-workspace-copy small { display: block; margin-top: 3px; color: #74707e; font-size: 9px; font-weight: 520; }
.yili-service-card small.is-ready { color: #45d39a !important; }
.yili-service-card small.is-error { color: #f08b9d !important; }
.yili-service-button span { font-weight: 700; }
.yili-service-modal label[hidden],
.yili-service-modal .demo-toggle[hidden],
.yili-service-modal button[hidden] { display: none !important; }
.yili-shared-service-status {
  margin: 12px 0;
  padding: 13px 14px;
  border: 1px solid rgba(139, 92, 246, .3);
  border-radius: 8px;
  color: #aaa6b3;
  background: rgba(139, 92, 246, .06);
  font-size: 12px;
  line-height: 1.65;
}
.yili-shared-service-status.is-ready { border-color: rgba(69, 211, 154, .36); color: #bcebd9; background: rgba(69, 211, 154, .06); }
.yili-shared-service-status.is-error { border-color: rgba(240, 139, 157, .38); color: #f2b8c2; background: rgba(240, 139, 157, .06); }

/* 主站旧构建的品牌区域覆盖：仅该页面加载本文件 */
.brand-mark > span:first-child {
  width: 34px !important;
  height: 34px !important;
  flex: 0 0 34px;
  border-radius: 9px !important;
  background: #0b0b11 url('/workspace-assets/yili-mark.svg') center / cover no-repeat !important;
  box-shadow: 0 0 22px rgba(139, 92, 246, .22);
}
.brand-mark > span:first-child svg { display: none !important; }
.brand-mark strong { font-size: 15px !important; letter-spacing: .08em !important; }
.brand-mark small { letter-spacing: .15em !important; }

/* 商品图主站可读性增强 */
.side-rail nav > small { color: #8d8998 !important; font-size: 12px !important; }
.side-rail nav button { min-height: 43px; font-size: 13px !important; line-height: 1.4; }
.side-rail nav button em { min-width: 20px; font-size: 11px !important; }
.side-rail .brand-mark small { color: #8d8998 !important; font-size: 11px !important; }
.side-rail .sidebar-foot b { font-size: 12px !important; }
.side-rail .sidebar-foot small { color: #8d8998 !important; font-size: 11px !important; }
.breadcrumbs, .breadcrumbs span, .breadcrumbs strong { font-size: 12px !important; }
.saved-dot { color: #aaa6b4 !important; font-size: 12px !important; }
.ghost-action { min-height: 40px !important; height: 40px !important; font-size: 12px !important; }
.section-kicker,
.control-heading span,
.section-title span,
.stage-toolbar > div:first-child span,
.analysis-summary small,
.analysis-canvas > span,
.empty-canvas .eyebrow { font-size: 12px !important; }
.projects-hero p { color: #aaa6b3 !important; font-size: 15px !important; }
.console-top,
.console-top span,
.console-top b,
.hero-console small,
.hero-console span,
.hero-console b { font-size: 11px !important; }
.dashboard-metrics small,
.dashboard-section-title small,
.draft-panel small,
.page-panel-head span,
.result-toolbar > div > span { font-size: 12px !important; }
.dashboard-metrics span { color: #918d9a !important; font-size: 12px !important; line-height: 1.5; }
.dashboard-section-title > span { color: #918d9a !important; font-size: 13px !important; }
.workflow-cards small { font-size: 12px !important; }
.workflow-cards b { font-size: 16px !important; }
.workflow-cards p { color: #9793a0 !important; font-size: 13px !important; line-height: 1.65 !important; }
.draft-panel p { color: #9793a0 !important; font-size: 13px !important; }
.draft-panel > button { min-height: 40px !important; height: 40px !important; font-size: 12px !important; }
.page-panel p,
.delivery-panel p,
.plan-error-panel p,
.planning-progress-panel p,
.visual-card p,
.asset-tip,
.library-card-body p,
.library-storage-grid article > p,
.library-storage-panel > footer { font-size: 12px !important; line-height: 1.6 !important; }
.form-grid label > span,
.library-modal label span,
.library-card-body span,
.library-card-body small,
.library-storage-panel > header small,
.library-storage-grid article > small { font-size: 11px !important; }
.form-grid input,
.form-grid textarea,
.form-grid select,
.library-upload-fields input,
.library-upload-fields textarea,
.library-modal input,
.library-modal textarea { font-size: 14px !important; line-height: 1.6; }
.primary-action,
.secondary-action,
.form-grid button,
.stage-toolbar button,
.result-toolbar button,
.library-toolbar button,
.library-upload-panel button,
.library-card-actions button,
.library-card-actions a,
.library-storage-panel button,
.library-modal footer button { min-height: 40px; font-size: 12px !important; }
.generation-progress-panel > p { font-size: 12px !important; }

/* 主站主题按钮 */
#yili-theme-toggle {
  min-height: 38px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line-bright);
  border-radius: 7px;
  background: #101012;
  color: #dedbe5;
  font: 650 12px/1 Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  cursor: pointer;
}
#yili-theme-toggle:hover { border-color: #6f4b9e; background: #17151b; }
#yili-theme-toggle .yili-theme-icon {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: #211431;
  color: #bd91fb;
  font: 800 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}
#yili-theme-toggle.yili-theme-floating { position: fixed; z-index: 9998; top: 17px; right: 142px; }

/* 商品图主站日间模式 */
:root[data-theme="light"] {
  color: #1c1924;
  --bg: #f3f4f8;
  --rail: #ffffff;
  --panel: #ffffff;
  --panel-2: #f7f7fb;
  --raised: #eeedf5;
  --line: #dddbe6;
  --line-bright: #c8c4d3;
  --text: #1c1924;
  --muted: #625e6c;
  --dim: #7b7685;
  --purple: #7c3aed;
  --purple-2: #6d28d9;
  --purple-soft: #7c3aed1c;
  --green: #07865e;
  --red: #c92143;
  background: #f3f4f8;
}
html[data-theme="light"] body,
html[data-theme="light"] .app-shell { background: #f3f4f8 !important; color: var(--text); }
[data-theme="light"] .side-rail,
[data-theme="light"] .top-bar { background: rgba(255,255,255,.95) !important; border-color: var(--line) !important; }
[data-theme="light"] .side-rail nav button { color: #514c5b !important; }
[data-theme="light"] .side-rail nav button:hover { color: #271b38 !important; background: #f5f1fc !important; }
[data-theme="light"] .side-rail nav button.active { color: #4c1d83 !important; background: #eee7fa !important; border-color: #d7c3f3 !important; }
[data-theme="light"] .side-rail nav button:disabled { color: #aaa5b1 !important; }
[data-theme="light"] .breadcrumbs,
[data-theme="light"] .breadcrumbs strong,
[data-theme="light"] .saved-dot { color: #5e5968 !important; }
[data-theme="light"] .ghost-action,
[data-theme="light"] #yili-theme-toggle { color: #393344 !important; background: #fff !important; border-color: #d2ceda !important; }
[data-theme="light"] #yili-theme-toggle:hover,
[data-theme="light"] .ghost-action:hover { color: #4c1d83 !important; border-color: #a98bd2 !important; background: #f8f5fc !important; }
[data-theme="light"] .projects-hero {
  background: radial-gradient(circle at 17% 10%, rgba(124,58,237,.14), transparent 35%), linear-gradient(145deg,#fff,#f5f4f8 72%) !important;
  border-color: var(--line) !important;
}
[data-theme="light"] .projects-hero h1,
[data-theme="light"] .dashboard-section-title h2,
[data-theme="light"] .page-panel h1,
[data-theme="light"] .page-panel h2,
[data-theme="light"] .page-panel h3,
[data-theme="light"] .creation-page h1,
[data-theme="light"] .creation-page h2,
[data-theme="light"] .creation-page h3,
[data-theme="light"] .library-hero h1,
[data-theme="light"] .library-card-body h3 { color: #1d1925 !important; }
[data-theme="light"] .projects-hero p,
[data-theme="light"] .dashboard-section-title > span,
[data-theme="light"] .workflow-cards p,
[data-theme="light"] .draft-panel p,
[data-theme="light"] .page-panel p,
[data-theme="light"] .visual-card p,
[data-theme="light"] .library-card-body p { color: #625d6c !important; }
[data-theme="light"] .hero-console { background: #faf9fc !important; border-color: #cfc2df !important; box-shadow: 0 26px 65px rgba(66,45,94,.14) !important; }
[data-theme="light"] .console-top { color: #686171 !important; border-color: #ddd8e5 !important; }
[data-theme="light"] .dashboard-metrics { background: var(--line) !important; border-color: var(--line) !important; }
[data-theme="light"] .dashboard-metrics article { background: #fff !important; }
[data-theme="light"] .dashboard-metrics b { color: #211d28 !important; }
[data-theme="light"] .dashboard-metrics span { color: #696473 !important; }
[data-theme="light"] .workflow-cards > button {
  color: #211d28 !important;
  background: #fff !important;
  border-color: #dcd9e3 !important;
  box-shadow: 0 10px 30px rgba(54,45,75,.06);
}
[data-theme="light"] .workflow-cards > button:hover:not(:disabled) { background: #faf7fe !important; border-color: #a98bd2 !important; }
[data-theme="light"] .workflow-cards > button > span { color: #6d28d9 !important; background: #f0e8fb !important; }
[data-theme="light"] .draft-panel { background: linear-gradient(90deg,#fff,#f8f7fb) !important; border-color: #dcd9e3 !important; }
[data-theme="light"] .draft-panel > div > span { color: #6d28d9 !important; background: #f0e8fb !important; border-color: #d7c3f3 !important; }
[data-theme="light"] .draft-panel > button { color: #5b258e !important; background: #f6f0fc !important; border-color: #d7c3f3 !important; }
[data-theme="light"] .page-panel,
[data-theme="light"] .delivery-panel,
[data-theme="light"] .narrow-panel,
[data-theme="light"] .planning-progress-panel,
[data-theme="light"] .plan-error-panel,
[data-theme="light"] .generation-progress-panel,
[data-theme="light"] .visual-card,
[data-theme="light"] .asset-page-grid > section,
[data-theme="light"] .library-auth-card,
[data-theme="light"] .library-state-card,
[data-theme="light"] .library-upload-panel,
[data-theme="light"] .library-card,
[data-theme="light"] .library-storage-panel { background: #fff !important; border-color: #dcd9e3 !important; color: #211d28 !important; }
[data-theme="light"] .page-panel-head,
[data-theme="light"] .stage-toolbar,
[data-theme="light"] .visual-head,
[data-theme="light"] .library-card-actions,
[data-theme="light"] .library-storage-panel > header,
[data-theme="light"] .library-storage-panel > footer { background: #f8f7fb !important; border-color: #ddd9e5 !important; }
[data-theme="light"] input,
[data-theme="light"] textarea,
[data-theme="light"] select,
[data-theme="light"] .library-upload-fields input,
[data-theme="light"] .library-upload-fields textarea,
[data-theme="light"] .library-modal input,
[data-theme="light"] .library-modal textarea {
  color: #211d28 !important;
  background: #fff !important;
  border-color: #cbc7d3 !important;
}
[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder { color: #9892a1 !important; }
[data-theme="light"] label,
[data-theme="light"] .form-grid label,
[data-theme="light"] .visual-card b,
[data-theme="light"] .stage-toolbar b { color: #28222f !important; }
[data-theme="light"] .asset-drop,
[data-theme="light"] .upload-zone,
[data-theme="light"] .empty-canvas,
[data-theme="light"] .visual-preview { background-color: #f1f1f6 !important; border-color: #d4cfdd !important; }
[data-theme="light"] .library-card-actions button,
[data-theme="light"] .library-card-actions a,
[data-theme="light"] .library-storage-panel button,
[data-theme="light"] .library-modal footer button { color: #4f4858 !important; background: #f7f6fa !important; border-color: #d7d3de !important; }
[data-theme="light"] .library-modal { background: rgba(35,29,43,.32) !important; }
[data-theme="light"] .library-modal > div { background: #fff !important; border-color: #c9bdd8 !important; box-shadow: 0 30px 90px rgba(45,32,62,.2) !important; }
[data-theme="light"] .library-storage-grid article { border-color: #dedbe5 !important; }
[data-theme="light"] .library-storage-grid article > strong { color: #27212f !important; }

/* 统一工作区导航的浅色模式 */
[data-theme="light"] .yili-workspace-link { color: #5f5968; }
[data-theme="light"] .yili-workspace-link:hover { color: #4c1d83; background: #f4eefb; border-color: #cbb7e5; }
[data-theme="light"] .yili-workspace-link.active { color: #4c1d83; background: #eee7fa; border-color: #d7c3f3; }
[data-theme="light"] .yili-workspace-code { color: #6d28d9; background: #f0e8fb; border-color: #d7c3f3; }
[data-theme="light"] .yili-workspace-copy small { color: #797280; }
[data-theme="light"] .yili-shared-service-status { color: #5f5968; background: #f7f3fc; border-color: #d7c3f3; }
[data-theme="light"] .yili-shared-service-status.is-ready { color: #0c704f; background: #eefaf5; border-color: #a9dfca; }
[data-theme="light"] .yili-shared-service-status.is-error { color: #a72a45; background: #fff2f5; border-color: #efbac5; }

@media (max-width: 640px) {
  #yili-theme-toggle { width: 38px; padding: 0; }
  #yili-theme-toggle > span:last-child { display: none; }
  #yili-theme-toggle.yili-theme-floating { right: 64px; }
}

/* 日间模式工作流主画布修复 */
[data-theme="light"] .workbench {
  background-color: #f3f4f8 !important;
  background-image: linear-gradient(rgba(46,39,57,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(46,39,57,.035) 1px, transparent 1px) !important;
}
[data-theme="light"] .workflow-header {
  background: radial-gradient(circle at 15% -20%, rgba(124,58,237,.11), transparent 34%), rgba(255,255,255,.76) !important;
  border-color: #dedbe5 !important;
}
[data-theme="light"] .workflow-header h1,
[data-theme="light"] .workflow-header p { color: #211d28 !important; }
[data-theme="light"] .workflow-header p { color: #625d6c !important; }
