/* 聚享AI·视觉 — shared theme layer
   Dark remains the product default; light is an explicit user preference
   persisted in localStorage under "juxiang.theme". */

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f2efe6;
  --bg-2: #eae6db;
  --panel: #fffdf8;
  --panel-2: #f7f4ec;
  --panel-3: #eee9dd;
  --line: #d7d1c2;
  --line-2: #e4dfd3;
  --text: #1b1d17;
  --muted: #64675d;
  --faint: #929589;
  --accent: #5f7a00;
  --accent-bright: #d8ff3e;
  --accent-2: #a6c62a;
  --accent-soft: rgba(111, 139, 0, 0.11);
  --danger: #b44141;
  --ok: #2f7d52;
  --warn: #a86e00;
  --info: #2d6f8a;
  --shadow-lg: 0 22px 60px rgba(47, 43, 30, 0.14);
  --grid-dot-minor: rgba(45, 48, 36, 0.10);
  --grid-dot-major: rgba(45, 48, 36, 0.17);
  --grid-dot-only: rgba(45, 48, 36, 0.13);
}

html[data-theme="dark"] {
  --grid-dot-minor: rgba(255, 255, 255, 0.048);
  --grid-dot-major: rgba(255, 255, 255, 0.075);
  --grid-dot-only: rgba(255, 255, 255, 0.06);
}

html[data-theme="light"] ::selection {
  background: rgba(111, 139, 0, 0.22);
  color: #11130b;
}
html[data-theme="light"] ::-webkit-scrollbar-track {
  background: #ebe7dc;
}
html[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: #c9c3b4;
  border-color: transparent;
}
html[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: #b3ac9b;
}

/* ---------- shared theme toggle ---------- */
.theme-toggle .theme-sun,
.theme-toggle .theme-moon {
  display: block;
}
.theme-toggle .theme-moon {
  display: none;
}
html[data-theme="light"] .theme-toggle .theme-sun {
  display: none;
}
html[data-theme="light"] .theme-toggle .theme-moon {
  display: block;
}
html[data-theme="light"] .theme-toggle svg {
  fill: none;
  stroke: currentColor;
}

/* ============================================================
   登录页
   ============================================================ */
html[data-theme="light"] body.theme-page-login {
  background: var(--bg);
  color: var(--text);
}
html[data-theme="light"] body.theme-page-login::before {
  background-image: radial-gradient(rgba(45, 48, 36, 0.12) 1px, transparent 1px);
  opacity: 0.18;
}
html[data-theme="light"] .theme-page-login .shell,
html[data-theme="light"] .theme-page-login .hero {
  background: #f2efe6;
}
html[data-theme="light"] .theme-page-login .hero {
  border-right-color: var(--line-2);
}
html[data-theme="light"] .theme-page-login .hero::after {
  background: radial-gradient(circle, rgba(154, 187, 20, 0.18), rgba(154, 187, 20, 0.04) 45%, transparent 70%);
}
html[data-theme="light"] .theme-page-login .auth-side {
  background: #fbf8f1;
}
html[data-theme="light"] .theme-page-login .auth-side::before {
  background: radial-gradient(circle, rgba(89, 118, 196, 0.12), transparent 68%);
}
html[data-theme="light"] .theme-page-login .mark {
  background: var(--accent-bright);
  color: #171a0b;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.7), 0 12px 32px rgba(111, 139, 0, 0.18);
}
html[data-theme="light"] .theme-page-login .brand-name {
  color: #23251d;
}
html[data-theme="light"] .theme-page-login .brand-sub {
  color: #898c80;
  border-left-color: var(--line);
}
html[data-theme="light"] .theme-page-login .eyebrow {
  border-color: #c7d995;
  background: rgba(216, 255, 62, 0.22);
  color: #526500;
}
html[data-theme="light"] .theme-page-login .eyebrow i {
  background: #789300;
  box-shadow: 0 0 10px rgba(111, 139, 0, 0.35);
}
html[data-theme="light"] .theme-page-login h1 {
  color: #1b1d17;
}
html[data-theme="light"] .theme-page-login h1 em {
  color: #5f7a00;
}
html[data-theme="light"] .theme-page-login .hero-copy {
  color: #55594f;
}
html[data-theme="light"] .theme-page-login .feature {
  border-color: #d7d1c2;
  background: rgba(255, 253, 248, 0.72);
  color: #55594f;
}
html[data-theme="light"] .theme-page-login .feature b {
  color: #22241c;
}
html[data-theme="light"] .theme-page-login .feature .dot {
  background: #789300;
}
html[data-theme="light"] .theme-page-login .hero-visual {
  border-color: #d7d1c2;
  background: linear-gradient(145deg, rgba(255, 253, 248, 0.96), rgba(241, 237, 226, 0.9));
  box-shadow: 0 18px 50px rgba(53, 48, 32, 0.08);
}
html[data-theme="light"] .theme-page-login .hero-visual::before {
  background: radial-gradient(circle at 13% 20%, rgba(196, 229, 62, 0.18), transparent 38%),
    radial-gradient(circle at 80% 80%, rgba(89, 118, 196, 0.10), transparent 42%);
}
html[data-theme="light"] .theme-page-login .visual-copy .kicker {
  color: #5f7a00;
}
html[data-theme="light"] .theme-page-login .visual-copy h3 {
  color: #22241c;
}
html[data-theme="light"] .theme-page-login .visual-copy p {
  color: #63675c;
}
html[data-theme="light"] .theme-page-login .hero-foot {
  color: #8a8d81;
}
html[data-theme="light"] .theme-page-login .card-top h2 {
  color: #171913;
}
html[data-theme="light"] .theme-page-login .card-top p {
  color: #686b60;
}
html[data-theme="light"] .theme-page-login .tabs {
  border-color: #d9d3c4;
  background: #f4f0e6;
}
html[data-theme="light"] .theme-page-login .tabs button {
  color: #70736a;
}
html[data-theme="light"] .theme-page-login .tabs button.active {
  background: #22241c;
  color: #fffdf8;
  box-shadow: inset 0 0 0 1px #383b30;
}
html[data-theme="light"] .theme-page-login .field label {
  color: #55594f;
}
html[data-theme="light"] .theme-page-login .field label span {
  color: #96998d;
}
html[data-theme="light"] .theme-page-login .input-wrap svg {
  color: #8a8d81;
}
html[data-theme="light"] .theme-page-login .field input {
  border-color: #d6d0c1;
  background: #fffdf8;
  color: #22241c;
}
html[data-theme="light"] .theme-page-login .field input::placeholder {
  color: #96998c;
}
html[data-theme="light"] .theme-page-login .field input:focus {
  border-color: #9cb52c;
  box-shadow: 0 0 0 3px rgba(111, 139, 0, 0.10);
}
html[data-theme="light"] .theme-page-login .tips {
  color: #73766b;
}
html[data-theme="light"] .theme-page-login .tips a {
  color: #464a3f;
}
html[data-theme="light"] .theme-page-login .tips a:hover {
  color: #5f7a00;
}
html[data-theme="light"] .theme-page-login .invite-hint {
  border-color: #d7dfb6;
  background: #f5f8e8;
  color: #67704c;
}
html[data-theme="light"] .theme-page-login .invite-hint svg {
  color: #718b00;
}
html[data-theme="light"] .theme-page-login .invite-hint code {
  color: #4f6108;
  background: #edf2d8;
  border-color: #ced99f;
}
html[data-theme="light"] .theme-page-login .error {
  border-color: rgba(180, 65, 65, 0.24);
  background: #fbf0ee;
  color: #a23c3c;
}
html[data-theme="light"] .theme-page-login .submit {
  background: var(--accent-bright);
  color: #171a0b;
  box-shadow: 0 14px 30px rgba(111, 139, 0, 0.14);
}
html[data-theme="light"] .theme-page-login .submit:hover {
  box-shadow: 0 18px 38px rgba(111, 139, 0, 0.20);
}
html[data-theme="light"] .theme-page-login .divider {
  color: #8b8e82;
}
html[data-theme="light"] .theme-page-login .footnote {
  color: #83867a;
}
html[data-theme="light"] .theme-page-login .footnote a {
  color: #55594f;
  border-bottom-color: #c9c3b4;
}
html[data-theme="light"] .theme-page-login .mobile-brand .brand-name {
  color: #1b1d17;
}
.theme-page-login .login-theme {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 6;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  color: var(--muted);
  display: grid;
  place-items: center;
  transition: 0.16s;
}
.theme-page-login .login-theme:hover {
  color: var(--text);
  border-color: #bdb6a5;
}
.theme-page-login .login-theme svg {
  width: 16px;
  height: 16px;
}
html[data-theme="light"] .theme-page-login .login-theme {
  background: #fffdf8;
  border-color: #d6d0c1;
  color: #6f7368;
}
@media (max-width: 900px) {
  .theme-page-login .login-theme {
    top: 14px;
    right: 14px;
  }
}

/* ============================================================
   无限画布
   ============================================================ */
html[data-theme="light"] body.theme-page-canvas {
  background: var(--bg);
  color: var(--text);
}
html[data-theme="light"] .theme-page-canvas #topbar {
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.97), rgba(243, 240, 231, 0.93));
  border-bottom-color: var(--line-2);
  box-shadow: 0 6px 22px rgba(60, 54, 36, 0.06);
}
html[data-theme="light"] .theme-page-canvas .brand {
  color: #303228;
}
html[data-theme="light"] .theme-page-canvas .project-name {
  color: #24261d;
}
html[data-theme="light"] .theme-page-canvas .project-name:hover {
  background: #e9e5d9;
}
html[data-theme="light"] .theme-page-canvas .project-name:focus {
  background: #fffdf8;
  border-color: #c9c3b3;
}
html[data-theme="light"] .theme-page-canvas .save-badge {
  color: #878a7d;
}
html[data-theme="light"] .theme-page-canvas .save-badge .dot {
  background: #a1a497;
}
html[data-theme="light"] .theme-page-canvas .model-chip {
  background: #faf7ef;
  color: #696c61;
  border-color: #d8d2c3;
}
html[data-theme="light"] .theme-page-canvas .model-chip:hover {
  color: #25271e;
  border-color: #bdb6a6;
  background: #fffdf8;
}
html[data-theme="light"] .theme-page-canvas .model-chip.live {
  border-color: #c2d886;
  background: #f1f6dc;
  color: #4d6200;
}
html[data-theme="light"] .theme-page-canvas .model-chip .mc-dot {
  background: #9a9d91;
}
html[data-theme="light"] .theme-page-canvas .model-chip.live .mc-dot {
  background: #789300;
  box-shadow: 0 0 8px rgba(120, 147, 0, 0.40);
}
html[data-theme="light"] .theme-page-canvas .credit-chip {
  border-color: #cbd79b;
  background: #f3f7e1;
  color: #506400;
}
html[data-theme="light"] .theme-page-canvas .credit-chip:hover {
  background: #edf3d3;
  border-color: #a8bd58;
  color: #3e5000;
}
html[data-theme="light"] .theme-page-canvas .user-btn {
  background: linear-gradient(145deg, #e6edcf, #fbf8ee);
  border-color: #c8d1a9;
  color: #5f7a00;
}
html[data-theme="light"] .theme-page-canvas .icon-btn {
  color: #767a6e;
}
html[data-theme="light"] .theme-page-canvas .icon-btn:hover {
  background: #e9e5da;
  color: #1b1d17;
}
html[data-theme="light"] .theme-page-canvas .icon-btn.accent::after {
  background: #789300;
  box-shadow: 0 0 6px rgba(120, 147, 0, 0.5);
}
.theme-page-canvas .theme-toggle {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
}
.theme-page-canvas .theme-toggle:hover {
  background: var(--panel-2);
  color: var(--text);
  border-color: #bdb6a5;
}
html[data-theme="light"] .theme-page-canvas .theme-toggle {
  background: #fffdf8;
  border-color: #d6d0c1;
  color: #6f7368;
}
html[data-theme="light"] .theme-page-canvas .theme-toggle:hover {
  background: #f1ede2;
  color: #1b1d17;
  border-color: #beb7a7;
}
html[data-theme="light"] .theme-page-canvas .btn {
  background: #fffdf8;
  border-color: #d6d0c1;
  color: #45483e;
}
html[data-theme="light"] .theme-page-canvas .btn:hover {
  background: #f1ede2;
  border-color: #c5beae;
  color: #171913;
}
html[data-theme="light"] .theme-page-canvas .btn.primary {
  background: var(--accent-bright);
  border-color: #c5e733;
  color: #171a0b;
}
html[data-theme="light"] .theme-page-canvas .btn.primary:hover {
  background: #e3ff78;
  border-color: #d4f05e;
}
html[data-theme="light"] .theme-page-canvas .btn.danger {
  color: #9e3e3e;
  border-color: #e3c2be;
  background: #fbf1ef;
}
html[data-theme="light"] .theme-page-canvas .btn.danger:hover {
  color: #8d3232;
  border-color: #d5aaa5;
  background: #f8e9e6;
}
html[data-theme="light"] .theme-page-canvas .mini-btn {
  color: #7c8074;
}
html[data-theme="light"] .theme-page-canvas .mini-btn:hover {
  background: #e7e2d6;
  color: #1b1d17;
}
html[data-theme="light"] .theme-page-canvas #viewport {
  background: #f2efe6;
}
html[data-theme="light"] .theme-page-canvas #viewport::after {
  background: radial-gradient(125% 95% at 50% 42%, transparent 48%, rgba(74, 67, 48, 0.10) 100%);
}
html[data-theme="light"] .theme-page-canvas .node {
  background: linear-gradient(180deg, #fffdf9, #f8f5ec);
  border-color: #d6d0c1;
  box-shadow: 0 18px 42px rgba(55, 48, 30, 0.12), inset 0 1px 0 #ffffff;
}
html[data-theme="light"] .theme-page-canvas .node.selected {
  border-color: #829c10;
  box-shadow: 0 0 0 1px rgba(111, 139, 0, 0.24), 0 0 28px rgba(111, 139, 0, 0.08),
    0 18px 42px rgba(55, 48, 30, 0.14);
}
html[data-theme="light"] .theme-page-canvas .node.link-hover {
  border-color: #9cb82b;
  box-shadow: 0 0 0 1px rgba(111, 139, 0, 0.18), 0 0 22px rgba(111, 139, 0, 0.08);
}
html[data-theme="light"] .theme-page-canvas .head-ico {
  background: #edf3d7;
  color: #607900;
}
html[data-theme="light"] .theme-page-canvas .node.image .head-ico {
  background: #e9effb;
  color: #5372b4;
}
html[data-theme="light"] .theme-page-canvas .node.text .head-ico {
  background: #f0e9fb;
  color: #7657a8;
}
html[data-theme="light"] .theme-page-canvas .head-label {
  color: #777b6e;
}
html[data-theme="light"] .theme-page-canvas .head-meta {
  color: #929588;
}
html[data-theme="light"] .theme-page-canvas .port {
  background: #fffdf8;
  border-color: #b8b1a0;
}
html[data-theme="light"] .theme-page-canvas .port:hover {
  border-color: #789300;
  background: #789300;
  box-shadow: 0 0 10px rgba(111, 139, 0, 0.35);
}
html[data-theme="light"] .theme-page-canvas .node.prompt .port.in {
  background: #eaf2cd;
}
html[data-theme="light"] .theme-page-canvas .prompt-input {
  color: #25271f;
  caret-color: #5f7a00;
}
html[data-theme="light"] .theme-page-canvas .prompt-input::placeholder {
  color: #989b90;
}
html[data-theme="light"] .theme-page-canvas .text-input {
  color: #25271f;
  caret-color: #7657a8;
}
html[data-theme="light"] .theme-page-canvas .text-input::placeholder {
  color: #989b90;
}
html[data-theme="light"] .theme-page-canvas .text-copy {
  background: #f8f5ec;
  border-color: #d6d0c1;
  color: #585b51;
}
html[data-theme="light"] .theme-page-canvas .ctl-select {
  border-color: #d6d0c1;
  background-color: #fffdf8;
  color: #4f5249;
}
html[data-theme="light"] .theme-page-canvas .ctl-select:hover {
  border-color: #bdb6a6;
  color: #20221a;
}
html[data-theme="light"] .theme-page-canvas .ctl-select:focus {
  border-color: #9cb52c;
}
html[data-theme="light"] .theme-page-canvas .count-seg {
  background: #f4f1e8;
  border-color: #d7d1c2;
}
html[data-theme="light"] .theme-page-canvas .count-btn {
  color: #7b7f73;
}
html[data-theme="light"] .theme-page-canvas .count-btn:hover {
  color: #24261d;
  background: #e8e3d7;
}
html[data-theme="light"] .theme-page-canvas .count-btn.active {
  background: #eaf2cc;
  color: #45560a;
  box-shadow: inset 0 0 0 1px #c3d48e;
}
html[data-theme="light"] .theme-page-canvas .gen-btn {
  background: var(--accent-bright);
  color: #171a0b;
}
html[data-theme="light"] .theme-page-canvas .gen-btn:hover {
  box-shadow: 0 0 18px rgba(111, 139, 0, 0.18);
}
html[data-theme="light"] .theme-page-canvas .gen-btn .btn-spin {
  border-color: rgba(17, 19, 9, 0.25);
  border-top-color: #171a0b;
}
html[data-theme="light"] .theme-page-canvas .prompt-foot {
  color: #85897c;
}
html[data-theme="light"] .theme-page-canvas .prompt-foot .cost-hint {
  color: #6b7e32;
}
html[data-theme="light"] .theme-page-canvas .foot-kbd {
  color: #8b8f82;
}
html[data-theme="light"] .theme-page-canvas .ref-chip {
  color: #5f7a00;
}
html[data-theme="light"] .theme-page-canvas .img-cell,
html[data-theme="light"] .theme-page-canvas .img-cell img {
  background: #f0ece2;
}
html[data-theme="light"] .theme-page-canvas .img-cell .cell-num {
  color: rgba(255, 255, 255, 0.78);
  background: rgba(20, 22, 17, 0.58);
}
html[data-theme="light"] .theme-page-canvas .cell-btn {
  color: #f4f5ef;
  background: rgba(30, 33, 25, 0.58);
  border-color: rgba(255, 255, 255, 0.16);
}
html[data-theme="light"] .theme-page-canvas .cell-btn:hover {
  background: var(--accent-bright);
  color: #171a0b;
}
html[data-theme="light"] .theme-page-canvas .ft-prompt {
  color: #6d7165;
}
html[data-theme="light"] .theme-page-canvas .ft-meta {
  color: #929588;
}
html[data-theme="light"] .theme-page-canvas .ft-meta .fb-dot {
  background: #b4ad9b;
}
html[data-theme="light"] .theme-page-canvas .skeleton {
  background: #f1ede3;
  color: #84887b;
}
html[data-theme="light"] .theme-page-canvas .skeleton::before {
  background: linear-gradient(100deg, transparent 18%, rgba(255, 255, 255, 0.45) 42%,
    rgba(255, 255, 255, 0.72) 50%, rgba(255, 255, 255, 0.45) 58%, transparent 82%);
}
html[data-theme="light"] .theme-page-canvas .sk-ico {
  border-color: #c6d98d;
  color: #607900;
}
html[data-theme="light"] .theme-page-canvas .sk-label {
  color: #73776b;
}
html[data-theme="light"] .theme-page-canvas .sk-sub {
  color: #96998d;
}
html[data-theme="light"] .theme-page-canvas .node-error {
  background: #fbf0ee;
  border-color: #e6c3bf;
}
html[data-theme="light"] .theme-page-canvas .node-error .ic,
html[data-theme="light"] .theme-page-canvas .node-error p {
  color: #a54545;
}
html[data-theme="light"] .theme-page-canvas .inline-error {
  background: #fbf1ef;
  border-color: #e4c2be;
  color: #9b4949;
}
html[data-theme="light"] .theme-page-canvas .inline-error button {
  background: #f4e4e1;
  color: #974444;
}
html[data-theme="light"] .theme-page-canvas #edges path.link {
  stroke: #b9b2a1;
}
html[data-theme="light"] .theme-page-canvas #edges path.link.active {
  stroke: #7f9a12;
}
html[data-theme="light"] .theme-page-canvas #edges .edge-dot {
  fill: #aaa392;
}
html[data-theme="light"] .theme-page-canvas #connLayer path.temp {
  stroke: #7f9a12;
}
html[data-theme="light"] .theme-page-canvas #leftRail,
html[data-theme="light"] .theme-page-canvas .minimap,
html[data-theme="light"] .theme-page-canvas .zoom-pill,
html[data-theme="light"] .theme-page-canvas #queueChip {
  background: rgba(255, 252, 245, 0.92);
  border-color: #d7d1c2;
  box-shadow: 0 12px 30px rgba(60, 54, 36, 0.09);
}
html[data-theme="light"] .theme-page-canvas .rail-btn {
  color: #777b6f;
}
html[data-theme="light"] .theme-page-canvas .rail-btn:hover {
  background: #ebe7dc;
  color: #1b1d17;
}
html[data-theme="light"] .theme-page-canvas .rail-btn.active {
  background: #edf3d7;
  color: #5f7a00;
  box-shadow: inset 0 0 0 1px #c5d694;
}
html[data-theme="light"] .theme-page-canvas .rail-btn::after {
  background: #fffdf8;
  border-color: #d6d0c1;
  color: #3f4238;
  box-shadow: 0 8px 20px rgba(60, 54, 36, 0.12);
}
html[data-theme="light"] .theme-page-canvas .mini-cap {
  color: #96998c;
}
html[data-theme="light"] .theme-page-canvas .zoom-pill button {
  color: #777b6f;
}
html[data-theme="light"] .theme-page-canvas .zoom-pill button:hover {
  background: #e8e3d7;
  color: #1b1d17;
}
html[data-theme="light"] .theme-page-canvas #zoomLabel {
  color: #4c5045;
}
html[data-theme="light"] .theme-page-canvas #hints {
  color: rgba(35, 37, 28, 0.42);
}
html[data-theme="light"] .theme-page-canvas #hints kbd {
  border-color: rgba(35, 37, 28, 0.14);
  background: rgba(255, 255, 255, 0.5);
  color: rgba(35, 37, 28, 0.55);
}
html[data-theme="light"] .theme-page-canvas #queueChip {
  color: #565a4e;
}
html[data-theme="light"] .theme-page-canvas #queueText .q-num {
  color: #5f7a00;
}
html[data-theme="light"] .theme-page-canvas .empty-ico {
  border-color: #cfdd9f;
  background: radial-gradient(circle at 32% 22%, rgba(216, 255, 62, 0.30), rgba(216, 255, 62, 0.05) 60%);
  color: #607900;
  box-shadow: 0 18px 60px rgba(111, 139, 0, 0.10), inset 0 1px 0 #ffffff;
}
html[data-theme="light"] .theme-page-canvas #emptyState h1 {
  color: #20221a;
}
html[data-theme="light"] .theme-page-canvas #emptyState p {
  color: #6c7065;
}
html[data-theme="light"] .theme-page-canvas .empty-chips span {
  color: #71756a;
  border-color: #d2ccbd;
  background: rgba(255, 253, 248, 0.7);
}
html[data-theme="light"] .theme-page-canvas #drawer {
  background: #fbf8f1;
  border-left-color: #d7d1c2;
  box-shadow: -30px 0 70px rgba(50, 45, 30, 0.14);
}
html[data-theme="light"] .theme-page-canvas #drawerMask {
  background: rgba(56, 51, 37, 0.24);
}
html[data-theme="light"] .theme-page-canvas .dr-head {
  border-bottom-color: #e3ded2;
}
html[data-theme="light"] .theme-page-canvas .dr-head p {
  color: #7e8175;
}
html[data-theme="light"] .theme-page-canvas .dr-project {
  background: #fbf8f1;
  border-bottom-color: #e3ded2;
}
html[data-theme="light"] .theme-page-canvas .dr-project label {
  color: #74786c;
}
html[data-theme="light"] .theme-page-canvas .dr-save {
  color: #929588;
}
html[data-theme="light"] .theme-page-canvas .dr-save.saving {
  color: #758b1e;
}
html[data-theme="light"] .theme-page-canvas .dr-save.error {
  color: #b64a35;
}
html[data-theme="light"] .theme-page-canvas .sec-title {
  color: #7d8174;
}
html[data-theme="light"] .theme-page-canvas .account-name {
  color: #292b23;
}
html[data-theme="light"] .theme-page-canvas .account-email {
  color: #8f9286;
}
html[data-theme="light"] .theme-page-canvas .credit-balance {
  border-color: #ccd59f;
  background: linear-gradient(135deg, rgba(216, 255, 62, 0.20), rgba(255, 253, 248, 0.92));
}
html[data-theme="light"] .theme-page-canvas .credit-balance span {
  color: #7a805c;
}
html[data-theme="light"] .theme-page-canvas .credit-balance b {
  color: #45560a;
}
html[data-theme="light"] .theme-page-canvas .plan-pill {
  color: #5e6d32;
  border-color: #cdd8a3;
  background: #eff4dc;
}
html[data-theme="light"] .theme-page-canvas .ledger-item {
  border-bottom-color: #e5e0d6;
}
html[data-theme="light"] .theme-page-canvas .ledger-item .lg-type {
  color: #777b6f;
}
html[data-theme="light"] .theme-page-canvas .ledger-item .lg-time {
  color: #9a9d91;
}
html[data-theme="light"] .theme-page-canvas .ledger-item .lg-delta.plus {
  color: #58710a;
}
html[data-theme="light"] .theme-page-canvas .ledger-item .lg-delta.minus {
  color: #a64747;
}
html[data-theme="light"] .theme-page-canvas .server-model {
  border-color: #dfd9cb;
  background: #fffdf8;
}
html[data-theme="light"] .theme-page-canvas .server-model .sm-name {
  color: #4b4e44;
}
html[data-theme="light"] .theme-page-canvas .server-model .sm-sub {
  color: #909386;
}
html[data-theme="light"] .theme-page-canvas .server-model .sm-cost {
  color: #5f7a00;
}
html[data-theme="light"] .theme-page-canvas .model-empty {
  border-color: #d7d1c2;
  color: #8b8e82;
}
html[data-theme="light"] .theme-page-canvas .note-line,
html[data-theme="light"] .theme-page-canvas .hint {
  color: #898d80;
}
html[data-theme="light"] .theme-page-canvas .sec-title .sec-extra {
  color: #8b8e82;
}
html[data-theme="light"] .theme-page-canvas .seg {
  background: #f4f1e8;
  border-color: #d7d1c2;
}
html[data-theme="light"] .theme-page-canvas .seg button {
  color: #777b6f;
}
html[data-theme="light"] .theme-page-canvas .seg button:hover {
  color: #24261d;
}
html[data-theme="light"] .theme-page-canvas .seg button.active {
  background: #fffdf8;
  color: #1b1d17;
  box-shadow: inset 0 0 0 1px #d4cdbe, 0 2px 6px rgba(53, 48, 32, 0.06);
}
html[data-theme="light"] .theme-page-canvas .field label {
  color: #74786c;
}
html[data-theme="light"] .theme-page-canvas .field label .tag {
  color: #9a9d90;
}
html[data-theme="light"] .theme-page-canvas .inp {
  background: #fffdf8;
  border-color: #d6d0c1;
  color: #24261d;
}
html[data-theme="light"] .theme-page-canvas .inp::placeholder {
  color: #96998c;
}
html[data-theme="light"] .theme-page-canvas .inp:focus {
  border-color: #9cb52c;
  box-shadow: 0 0 0 3px rgba(111, 139, 0, 0.09);
}
html[data-theme="light"] .theme-page-canvas .demo-note {
  background: #f5f8e8;
  border-color: #d7dfb6;
  color: #687149;
}
html[data-theme="light"] .theme-page-canvas .demo-note .ic {
  color: #6f8900;
}
html[data-theme="light"] .theme-page-canvas #testResult {
  color: #7f8376;
}
html[data-theme="light"] .theme-page-canvas #testResult.ok {
  color: #58710a;
}
html[data-theme="light"] .theme-page-canvas #testResult.err {
  color: #a64747;
}
html[data-theme="light"] .theme-page-canvas .dr-foot {
  border-top-color: #e3ded2;
  background: #f5f1e8;
}
html[data-theme="light"] .theme-page-canvas .kbd-row {
  color: #7a7e71;
  border-bottom-color: rgba(60, 54, 36, 0.08);
}
html[data-theme="light"] .theme-page-canvas .kbd-row kbd {
  color: #4b4e44;
  background: #fffdf8;
  border-color: #d4cdbe;
}
html[data-theme="light"] .theme-page-canvas #lightbox {
  background: rgba(247, 244, 236, 0.96);
}
html[data-theme="light"] .theme-page-canvas .lb-top {
  color: #6f7367;
}
html[data-theme="light"] .theme-page-canvas .lb-top .icon-btn:hover {
  background: rgba(60, 54, 36, 0.08);
}
html[data-theme="light"] .theme-page-canvas #lbImg {
  box-shadow: 0 30px 80px rgba(50, 45, 30, 0.22);
}
html[data-theme="light"] .theme-page-canvas .lb-nav {
  color: #474a40;
  background: rgba(255, 253, 248, 0.82);
  border-color: #d6d0c1;
}
html[data-theme="light"] .theme-page-canvas .lb-nav:hover {
  background: #fffdf8;
}
html[data-theme="light"] .theme-page-canvas #lbPrompt {
  color: #6c7064;
}
html[data-theme="light"] .theme-page-canvas #exportMenu,
html[data-theme="light"] .theme-page-canvas #ctxMenu {
  background: #fffdf8;
  border-color: #d6d0c1;
  box-shadow: 0 20px 48px rgba(50, 45, 30, 0.16);
}
html[data-theme="light"] .theme-page-canvas .menu-item,
html[data-theme="light"] .theme-page-canvas .ctx-item {
  color: #4b4e44;
}
html[data-theme="light"] .theme-page-canvas .menu-item:hover,
html[data-theme="light"] .theme-page-canvas .ctx-item:hover {
  background: #f0ebdf;
  color: #171913;
}
html[data-theme="light"] .theme-page-canvas .ctx-item.danger {
  color: #a64747;
}
html[data-theme="light"] .theme-page-canvas .toast {
  background: rgba(255, 253, 248, 0.98);
  border-color: #d6d0c1;
  color: #34372d;
  box-shadow: 0 16px 40px rgba(50, 45, 30, 0.16);
}
html[data-theme="light"] .theme-page-canvas .toast.ok {
  border-color: #c9d98f;
}
html[data-theme="light"] .theme-page-canvas .toast.ok .ic {
  color: #5f7a00;
}
html[data-theme="light"] .theme-page-canvas .toast.err {
  border-color: #e2bcb8;
}
html[data-theme="light"] .theme-page-canvas .toast.err .ic {
  color: #a64747;
}
html[data-theme="light"] .theme-page-canvas #dropHint {
  border-color: #b9cf68;
  background: rgba(216, 255, 62, 0.10);
}
html[data-theme="light"] .theme-page-canvas #dropHint div {
  background: #fffdf8;
  border-color: #cbdc92;
  color: #24261d;
}
html[data-theme="light"] .theme-page-canvas #dropHint .ic {
  color: #5f7a00;
}

/* ============================================================
   运营后台
   ============================================================ */
html[data-theme="light"] body.theme-page-admin {
  background: var(--bg);
  color: var(--text);
}
html[data-theme="light"] .theme-page-admin .sidebar {
  background: #fbf8f1;
  border-right-color: #ded8ca;
}
html[data-theme="light"] .theme-page-admin .side-brand {
  border-bottom-color: #e4dfd3;
}
html[data-theme="light"] .theme-page-admin .logo {
  background: var(--accent-bright);
  color: #171a0b;
  box-shadow: 0 0 22px rgba(111, 139, 0, 0.12);
}
html[data-theme="light"] .theme-page-admin .brand-name {
  color: #23251d;
}
html[data-theme="light"] .theme-page-admin .brand-sub {
  color: #8c8f82;
}
html[data-theme="light"] .theme-page-admin .nav-label {
  color: #999c90;
}
html[data-theme="light"] .theme-page-admin .nav-item {
  color: #666a5e;
}
html[data-theme="light"] .theme-page-admin .nav-item:hover {
  background: #f0ece1;
  color: #1b1d17;
}
html[data-theme="light"] .theme-page-admin .nav-item.active {
  background: linear-gradient(90deg, rgba(216, 255, 62, 0.30), rgba(216, 255, 62, 0.08));
  color: #46570a;
  box-shadow: inset 2px 0 0 #6f8700;
}
html[data-theme="light"] .theme-page-admin .nav-item.active svg {
  color: #5f7a00;
}
html[data-theme="light"] .theme-page-admin .nav-badge {
  background: #eff4dc;
  color: #5b6c24;
  border-color: #cdd8a3;
}
html[data-theme="light"] .theme-page-admin .side-foot {
  border-top-color: #e4dfd3;
}
html[data-theme="light"] .theme-page-admin .side-link {
  color: #85897c;
}
html[data-theme="light"] .theme-page-admin .side-link:hover {
  background: #f0ece1;
  color: #34372d;
}
html[data-theme="light"] .theme-page-admin .topbar {
  background: rgba(251, 248, 241, 0.86);
  border-bottom-color: #e4dfd3;
}
html[data-theme="light"] .theme-page-admin .page-head h1 {
  color: #1b1d17;
}
html[data-theme="light"] .theme-page-admin .page-head p {
  color: #8c8f82;
}
html[data-theme="light"] .theme-page-admin .icon-btn {
  border-color: #d6d0c1;
  background: #fffdf8;
  color: #6e7266;
}
html[data-theme="light"] .theme-page-admin .icon-btn:hover {
  background: #f3efe5;
  color: #1b1d17;
  border-color: #beb7a7;
}
html[data-theme="light"] .theme-page-admin .admin-chip {
  border-color: #d6d0c1;
  background: #fffdf8;
}
html[data-theme="light"] .theme-page-admin .admin-name {
  color: #3e4137;
}
html[data-theme="light"] .theme-page-admin .admin-role {
  color: #929588;
}
html[data-theme="light"] .theme-page-admin .avatar {
  background: var(--accent-bright);
  color: #171a0b;
}
html[data-theme="light"] .theme-page-admin .content::before {
  background: radial-gradient(circle, rgba(160, 190, 20, 0.10), transparent 62%);
}
html[data-theme="light"] .theme-page-admin .metric {
  background: linear-gradient(160deg, #fffdf8, #f5f1e8);
  border-color: #d9d3c4;
  box-shadow: 0 10px 28px rgba(55, 48, 30, 0.05);
}
html[data-theme="light"] .theme-page-admin .metric::after {
  background: radial-gradient(circle, rgba(160, 190, 20, 0.10), transparent 70%);
}
html[data-theme="light"] .theme-page-admin .metric .m-ico {
  background: #f0ece1;
  color: #7a7e72;
}
html[data-theme="light"] .theme-page-admin .metric .m-label,
html[data-theme="light"] .theme-page-admin .metric .m-sub {
  color: #8a8d81;
}
html[data-theme="light"] .theme-page-admin .metric .m-value {
  color: #1b1d17;
}
html[data-theme="light"] .theme-page-admin .panel {
  background: #fffdf8;
  border-color: #d9d3c4;
  box-shadow: 0 10px 28px rgba(55, 48, 30, 0.04);
}
html[data-theme="light"] .theme-page-admin .panel-head {
  border-bottom-color: #e6e1d5;
}
html[data-theme="light"] .theme-page-admin .panel-title {
  color: #2a2d24;
}
html[data-theme="light"] .theme-page-admin .panel-title svg {
  color: #647e00;
}
html[data-theme="light"] .theme-page-admin .panel-sub {
  color: #8a8d81;
}
html[data-theme="light"] .theme-page-admin .chart::before {
  background: repeating-linear-gradient(to top, transparent 0, transparent calc(25% - 1px),
    #ebe6da calc(25% - 1px), #ebe6da 25%);
}
html[data-theme="light"] .theme-page-admin .bar-success {
  background: linear-gradient(180deg, #9ab52b, #d8ff3e);
}
html[data-theme="light"] .theme-page-admin .bar-other {
  background: #dcd6c8;
}
html[data-theme="light"] .theme-page-admin .bar-col .x-label,
html[data-theme="light"] .theme-page-admin .bar-col .bar-num {
  color: #85897d;
}
html[data-theme="light"] .theme-page-admin table {
  color: #3f4238;
}
html[data-theme="light"] .theme-page-admin th {
  color: #7b7f73;
  background: #f7f3ea;
  border-bottom-color: #e3ded2;
}
html[data-theme="light"] .theme-page-admin td {
  border-bottom-color: #e9e4d8;
  color: #4c5045;
}
html[data-theme="light"] .theme-page-admin tbody tr:hover td {
  background: #f7f3e9;
}
html[data-theme="light"] .theme-page-admin .table-empty {
  color: #8a8d81;
}
html[data-theme="light"] .theme-page-admin .user-avatar {
  background: #eef2de;
  border-color: #d0d8b7;
  color: #50600c;
}
html[data-theme="light"] .theme-page-admin .user-name {
  color: #2a2d24;
}
html[data-theme="light"] .theme-page-admin .user-email {
  color: #8a8d81;
}
html[data-theme="light"] .theme-page-admin .pill.ok {
  color: #256b45;
  background: #e9f6ef;
  border-color: #b9dfca;
}
html[data-theme="light"] .theme-page-admin .pill.ok::before {
  background: #2f7d52;
  box-shadow: none;
}
html[data-theme="light"] .theme-page-admin .pill.off {
  color: #777b6f;
  background: #f3efe5;
  border-color: #d9d3c4;
}
html[data-theme="light"] .theme-page-admin .pill.off::before {
  background: #929589;
}
html[data-theme="light"] .theme-page-admin .pill.warn {
  color: #8a5b00;
  background: #fbf3df;
  border-color: #e7d3a2;
}
html[data-theme="light"] .theme-page-admin .pill.warn::before {
  background: #a86e00;
}
html[data-theme="light"] .theme-page-admin .pill.err {
  color: #9e3e3e;
  background: #fbf0ee;
  border-color: #e5c2be;
}
html[data-theme="light"] .theme-page-admin .pill.err::before {
  background: #b44141;
}
html[data-theme="light"] .theme-page-admin .pill.info {
  color: #286179;
  background: #edf7fa;
  border-color: #c2e2ec;
}
html[data-theme="light"] .theme-page-admin .pill.info::before {
  background: #2d6f8a;
}
html[data-theme="light"] .theme-page-admin .btn {
  border-color: #d6d0c1;
  background: #fffdf8;
  color: #4c4f45;
}
html[data-theme="light"] .theme-page-admin .btn:hover {
  border-color: #beb7a7;
  background: #f3efe5;
  color: #1b1d17;
}
html[data-theme="light"] .theme-page-admin .btn.primary {
  background: var(--accent-bright);
  border-color: #c9e33a;
  color: #171a0b;
}
html[data-theme="light"] .theme-page-admin .btn.primary:hover {
  background: #e3ff78;
  border-color: #d4f05e;
  box-shadow: 0 6px 20px rgba(111, 139, 0, 0.12);
}
html[data-theme="light"] .theme-page-admin .btn.ghost {
  background: transparent;
}
html[data-theme="light"] .theme-page-admin .btn.danger {
  color: #9e3e3e;
  border-color: #e3c2be;
  background: #fbf1ef;
}
html[data-theme="light"] .theme-page-admin .btn.danger:hover {
  border-color: #d5aaa5;
  background: #f8e9e6;
}
html[data-theme="light"] .theme-page-admin .search svg {
  color: #93968a;
}
html[data-theme="light"] .theme-page-admin .input,
html[data-theme="light"] .theme-page-admin .select {
  border-color: #d6d0c1;
  background: #fffdf8;
  color: #2f322a;
}
html[data-theme="light"] .theme-page-admin .input::placeholder {
  color: #989b8f;
}
html[data-theme="light"] .theme-page-admin .input:focus,
html[data-theme="light"] .theme-page-admin .select:focus {
  border-color: #9cb52c;
  box-shadow: 0 0 0 3px rgba(111, 139, 0, 0.09);
}
html[data-theme="light"] .theme-page-admin .select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23787c70' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
}
html[data-theme="light"] .theme-page-admin .field label {
  color: #6d7165;
}
html[data-theme="light"] .theme-page-admin .field .req {
  color: #5f7a00;
}
html[data-theme="light"] .theme-page-admin .field textarea {
  border-color: #d6d0c1;
  background: #fffdf8;
  color: #2f322a;
}
html[data-theme="light"] .theme-page-admin .field .hint {
  color: #8a8d81;
}
html[data-theme="light"] .theme-page-admin .modal {
  background: #fffdf8;
  border-color: #d6d0c1;
  box-shadow: 0 30px 90px rgba(50, 45, 30, 0.22);
}
html[data-theme="light"] .theme-page-admin .modal-head {
  border-bottom-color: #e3ded2;
}
html[data-theme="light"] .theme-page-admin .modal-head p {
  color: #8a8d81;
}
html[data-theme="light"] .theme-page-admin .modal-foot {
  border-top-color: #e3ded2;
  background: #f7f3ea;
}
html[data-theme="light"] .theme-page-admin .close-btn {
  border-color: #d6d0c1;
  background: #f7f4ec;
  color: #74786c;
}
html[data-theme="light"] .theme-page-admin .close-btn:hover {
  color: #1b1d17;
  border-color: #beb7a7;
}
html[data-theme="light"] .theme-page-admin .toast {
  background: #fffdf8;
  border-color: #d6d0c1;
  color: #3c3f35;
  box-shadow: 0 12px 40px rgba(50, 45, 30, 0.14);
}
html[data-theme="light"] .theme-page-admin .toast.ok {
  border-color: #b9dfca;
  background: #eff8f3;
  color: #256b45;
}
html[data-theme="light"] .theme-page-admin .toast.err {
  border-color: #e3c2be;
  background: #fbf1ef;
  color: #9e3e3e;
}
html[data-theme="light"] .theme-page-admin .empty svg {
  color: #b7b0a0;
}
html[data-theme="light"] .theme-page-admin .empty b {
  color: #5e6257;
}
html[data-theme="light"] .theme-page-admin .section-title h2 {
  color: #2f322a;
}
html[data-theme="light"] .theme-page-admin .section-title h2 svg {
  color: #647e00;
}
html[data-theme="light"] .theme-page-admin .section-title .sub {
  color: #8a8d81;
}
html[data-theme="light"] .theme-page-admin .model-card {
  border-color: #d9d3c4;
  background: #fffdf8;
  box-shadow: 0 8px 24px rgba(55, 48, 30, 0.04);
}
html[data-theme="light"] .theme-page-admin .model-card:hover {
  border-color: #beb7a7;
  background: #fffefa;
}
html[data-theme="light"] .theme-page-admin .model-card::after {
  background: radial-gradient(circle, rgba(160, 190, 20, 0.08), transparent 70%);
}
html[data-theme="light"] .theme-page-admin .model-name {
  color: #282b22;
}
html[data-theme="light"] .theme-page-admin .model-provider {
  color: #8e9185;
}
html[data-theme="light"] .theme-page-admin .model-cost b {
  color: #5f7a00;
}
html[data-theme="light"] .theme-page-admin .model-cost span {
  color: #929588;
}
html[data-theme="light"] .theme-page-admin .tag {
  background: #f5f1e8;
  border-color: #ddd7c8;
  color: #777b6f;
}
html[data-theme="light"] .theme-page-admin .tag.green {
  color: #526300;
  border-color: #cfd99f;
  background: #f1f5df;
}
html[data-theme="light"] .theme-page-admin .model-stats {
  border-color: #dfd9cb;
}
html[data-theme="light"] .theme-page-admin .model-stat {
  background: #f8f5ed;
}
html[data-theme="light"] .theme-page-admin .model-stat span {
  color: #8f9286;
}
html[data-theme="light"] .theme-page-admin .model-stat b {
  color: #3e4137;
}
html[data-theme="light"] .theme-page-admin .switch {
  color: #6d7165;
}
html[data-theme="light"] .theme-page-admin .switch input {
  background: #ddd7c9;
  border-color: #cfc8b8;
}
html[data-theme="light"] .theme-page-admin .switch input::after {
  background: #fffdf8;
}
html[data-theme="light"] .theme-page-admin .switch input:checked {
  background: #e8f2c4;
  border-color: #b5ca76;
}
html[data-theme="light"] .theme-page-admin .switch input:checked::after {
  background: #6f8700;
  box-shadow: none;
}
html[data-theme="light"] .theme-page-admin .kv .k {
  color: #7b7f73;
}
html[data-theme="light"] .theme-page-admin .kv .v {
  color: #3e4137;
}
html[data-theme="light"] .theme-page-admin .asset {
  border-color: #d6d0c1;
  background: #f2eee4;
}
html[data-theme="light"] .theme-page-admin .asset .asset-badge {
  background: rgba(20, 22, 17, 0.68);
  border-color: rgba(255, 255, 255, 0.18);
  color: #f5f6ef;
}
html[data-theme="light"] .theme-page-admin .job-prompt {
  background: #f7f4ec;
  border-color: #ddd7c8;
  color: #4c5045;
}
html[data-theme="light"] .theme-page-admin .copy {
  color: #85897c;
}
html[data-theme="light"] .theme-page-admin .copy:hover {
  color: #5f7a00;
  background: #f1f5df;
}
html[data-theme="light"] .theme-page-admin .invite-code {
  color: #526300;
  background: #f1f5df;
  border-color: #ced99f;
}
html[data-theme="light"] .theme-page-admin .progress {
  background: #e6e1d5;
}
html[data-theme="light"] .theme-page-admin .progress i {
  background: #8aa800;
  opacity: 1;
}
html[data-theme="light"] .theme-page-admin .credit-plus {
  color: #58710a;
}
html[data-theme="light"] .theme-page-admin .pagination {
  border-top-color: #e6e1d5;
  color: #85897c;
}
html[data-theme="light"] .theme-page-admin .page-btn {
  border-color: #d6d0c1;
  background: #fffdf8;
  color: #74786c;
}
html[data-theme="light"] .theme-page-admin .page-btn.active {
  background: var(--accent-bright);
  border-color: #c9e33a;
  color: #171a0b;
}
html[data-theme="light"] .theme-page-admin .loading {
  color: #8a8d81;
}
html[data-theme="light"] .theme-page-admin .spinner {
  border-color: #ddd7c8;
  border-top-color: #6f8700;
}

/* v1.6 生文模式与文本框浅色适配 */
html[data-theme="light"] .mode-btn[data-mode="text"].active {
  background: #eee8fb;
  color: #5f3fa6;
  box-shadow: inset 0 0 0 1px rgba(120, 83, 190, .24);
}
html[data-theme="light"] .node.prompt .head-ico.text-ico {
  background: rgba(183, 148, 255, .16);
  color: #6d4bb8;
}
html[data-theme="light"] .node.text .head-ico {
  background: rgba(183, 148, 255, .16);
  color: #6d4bb8;
}
