/* 日间主题与夜间主题使用同一套布局及交互，只切换颜色。 */
html[data-theme="light"] {
  color-scheme: light;
  --surface: #ffffff;
  --surface-raised: #f7f8fa;
  --surface-hover: #f0f1f5;
  --line: #e2e8f1;
  --blue: #245bd6;
  --accent: #245bd6;
  --ink: #242731;
  --muted: #666d7a;
  --green: #18815c;
  background: #f6f8fc;
}
html[data-theme="light"] body { background: #f6f8fc; color: #242731; }
html[data-theme="light"] button,
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea { color-scheme: light; }
html[data-theme="light"] button:focus-visible,
html[data-theme="light"] a:focus-visible,
html[data-theme="light"] input:focus-visible,
html[data-theme="light"] select:focus-visible,
html[data-theme="light"] textarea:focus-visible { outline-color: #3970e1; }
html[data-theme="light"] .sidebar { background: #171b22; border-color: #303844; }
html[data-theme="light"] .brand { color: #252833; border-color: #e5e7ed; }
html[data-theme="light"] .brand-mark { background: #e8f1ff; color: #245bd6; border-color: #d2e1f8; }
html[data-theme="light"] .brand small { color: #85818e; }
html[data-theme="light"] .sidebar .brand { color: #f1f4f8; border-color: #303844; }
html[data-theme="light"] .sidebar .brand-mark { background: #263649; color: #c6ddff; border-color: #405977; }
html[data-theme="light"] .nav { scrollbar-color: #465262 transparent; }
html[data-theme="light"] .nav-label { color: #98a6b7; }
html[data-theme="light"] .nav-button { color: #b9c4d1; }
html[data-theme="light"] .nav-button:hover,
html[data-theme="light"] .nav-child:hover { background: #252d38; color: #f1f5fa; }
html[data-theme="light"] .nav-button.active,
html[data-theme="light"] .nav-child.active { background: #263b57; color: #e4f0ff; }
html[data-theme="light"] .nav-button.active::before { background: #80b5ff; }
html[data-theme="light"] .nav-parent.current-parent { color: #edf3fa; }
html[data-theme="light"] .nav-icon { color: #9aa9bb; }
html[data-theme="light"] .nav-button.active .nav-icon { color: #a9cfff; }
html[data-theme="light"] .nav-children { border-color: #394552; }
html[data-theme="light"] .nav-child { color: #abb9ca; }
html[data-theme="light"] .nav-child.active::after { background: #80b5ff; }
html[data-theme="light"] .nav-parent .nav-chevron { stroke: #9aa9bb; }
html[data-theme="light"] .sidebar button:focus-visible { outline-color: #9cc9ff; }
html[data-theme="light"] .sidebar-foot { color: #888592; border-color: #e8e6ed; }
html[data-theme="light"] .main {
  background: radial-gradient(ellipse 800px 600px at 90% 4%, rgba(110, 164, 246, .14), transparent 72%),
    radial-gradient(ellipse 740px 560px at 18% 85%, rgba(152, 185, 236, .08), transparent 74%), #f6f8fc;
}
html[data-theme="light"] .topbar { background: #fff; border-color: #e4e7ed; }
html[data-theme="light"] .breadcrumb { color: #7e7d8a; }
html[data-theme="light"] .breadcrumb strong { color: #303b46; }
html[data-theme="light"] .top-actions { color: #616c76; }
html[data-theme="light"] .theme-toggle { background: #fff; border-color: #dedce7; color: #65727e; }
html[data-theme="light"] .theme-toggle:hover { background: #edf4ff; color: #245bd6; }
html[data-theme="light"] .avatar { background: #e8f1ff; color: #245bd6; }
html[data-theme="light"] .page-title,
html[data-theme="light"] .sl-head h1,
html[data-theme="light"] .tkt-top h1 { color: #242f3a; }
html[data-theme="light"] .page-subtitle,
html[data-theme="light"] .sl-head p,
html[data-theme="light"] .tkt-top p { color: #777582; }
html[data-theme="light"] .panel,
html[data-theme="light"] .metric { background: #fff; border-color: #e2e8f1; box-shadow: 0 2px 8px rgba(31,39,54,.025); }
html[data-theme="light"] .panel-head h2,
html[data-theme="light"] .section-title { color: #303c47; }
html[data-theme="light"] .muted { color: #73727f; }
html[data-theme="light"] .btn { background: #fff; border-color: #d5ddea; color: #485561; }
html[data-theme="light"] .btn:hover { background: #f1f6ff; border-color: #a8bff0; color: #245bd6; }
html[data-theme="light"] .btn-primary { color: #fff; background: #245bd6; border-color: #245bd6; }
html[data-theme="light"] .btn-primary:hover { color: #fff; background: #1b49b2; border-color: #1b49b2; }
html[data-theme="light"] .btn-ghost { background: #f6f5f9; border-color: #e4e2eb; }
html[data-theme="light"] .link { color: #245bd6; }
html[data-theme="light"] .link:hover { color: #1b49b2; }
html[data-theme="light"] .input,
html[data-theme="light"] .select,
html[data-theme="light"] input:not([type=checkbox]):not([type=radio]),
html[data-theme="light"] select,
html[data-theme="light"] textarea { color: #303b46; background: #fff; border-color: #d5ddea; }
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder { color: #707785; }
html[data-theme="light"] .field { color: #687480; }
html[data-theme="light"] .data-table th { background: #f4f7fb; color: #626a78; }
html[data-theme="light"] .data-table td { color: #44515c; border-color: #ecebf0; }
html[data-theme="light"] .data-table tbody tr:hover { background: #f8f7fb; }
html[data-theme="light"] .badge { background: #e8f1ff; color: #245bd6; }
html[data-theme="light"] .tab { color: #777481; }
html[data-theme="light"] .tab:hover { color: #1b49b2; background: #f1f6ff; }
html[data-theme="light"] .tab.active { color: #245bd6; background: #e8f1ff; }
html[data-theme="light"] .empty { color: #6e7582; }
html[data-theme="light"] .metric-top { color: #666d7a; }
html[data-theme="light"] .metric-icon { background: #e8f1ff; color: #245bd6; }
html[data-theme="light"] .metric strong { color: #242f3a; }
html[data-theme="light"] .metric small { color: #747b88; }
html[data-theme="light"] .positive { color: #18815c !important; }
html[data-theme="light"] .brand-chip { background: #fff; border-color: #dedce8; color: #66727d; }
html[data-theme="light"] .brand-chip.active { background: #e8f1ff; border-color: #cadcf7; color: #245bd6; }
html[data-theme="light"] .summary-row { border-color: #ecebf0; }
html[data-theme="light"] .notice { background: #f1f6ff; border-color: #dce8fa; color: #566f82; }
html[data-theme="light"] .toast { background: #fff; border-color: #e0dfea; color: #45525d; box-shadow: 0 10px 36px #20303c20; }
html[data-theme="light"] .modal-mask { background: #24344077; }
html[data-theme="light"] .drawer { background: #fff; color: #29343e; }
html[data-theme="light"] .drawer-header,
html[data-theme="light"] .drawer-footer { border-color: #e8e7ed; }
html[data-theme="light"] .drawer-close { color: #777481; }
html[data-theme="light"] .login { background: #f8f8fb; }
html[data-theme="light"] .login-aside { background: radial-gradient(ellipse at 16% 78%, #e7f0ff, #f5f8ff 55%, #fafcfd 85%); border-color: #e4e1eb; }
html[data-theme="light"] .login-aside:after { border-color: #7892a015; box-shadow: 0 0 0 65px #7892a008, 0 0 0 130px #7892a006; }
html[data-theme="light"] .login-aside .brand,
html[data-theme="light"] .login-aside h1,
html[data-theme="light"] .login-box h2 { color: #293640; }
html[data-theme="light"] .login-aside p,
html[data-theme="light"] .login-aside footer,
html[data-theme="light"] .login-box p { color: #777481; }
html[data-theme="light"] .login-main { background: #fff; }

/* 以下模块样式由脚本动态插入，使用主题选择器覆盖其夜间配色。 */
html[data-theme="light"] .sl-head h1 { color: #293640; }
html[data-theme="light"] .sl-head p,
html[data-theme="light"] .sl-caption,
html[data-theme="light"] .sl-footer,
html[data-theme="light"] .sl-ledger-banner span { color: #777481; }
html[data-theme="light"] .sl-field,
html[data-theme="light"] .sl-dialog label { color: #56616c; }
html[data-theme="light"] .sl-field input,
html[data-theme="light"] .sl-field select,
html[data-theme="light"] .sl-dialog input,
html[data-theme="light"] .sl-dialog select { background: #fff; border-color: #d5ddea; color: #303b46; }
html[data-theme="light"] .sl-field input::placeholder,
html[data-theme="light"] .sl-dialog input::placeholder { color: #9996a2; }
html[data-theme="light"] .sl-table th { background: #f6f6f9; color: #777481; }
html[data-theme="light"] .sl-table td { border-bottom-color: #ecebf0; color: #485561; }
html[data-theme="light"] .sl-table tbody tr:hover { background: #f8f7fb; }
html[data-theme="light"] .sl-table .sl-name { color: #293640; }
html[data-theme="light"] .sl-link { color: #245bd6; }
html[data-theme="light"] .sl-link:hover { color: #1b49b2; }
html[data-theme="light"] .sl-status { color: #18815c; }
html[data-theme="light"] .sl-status.off { color: #888592; }
html[data-theme="light"] .sl-empty { color: #888592; }
html[data-theme="light"] .sl-tabs,
html[data-theme="light"] .sl-ledger-banner { border-bottom-color: #e8e7ed; }
html[data-theme="light"] .sl-tabs button { color: #777481; }
html[data-theme="light"] .sl-tabs button:hover { color: #1b49b2; }
html[data-theme="light"] .sl-tabs button.active { color: #245bd6; border-bottom-color: #3470e8; }
html[data-theme="light"] .sl-ledger-icon { background: #e8f1ff; color: #245bd6; }
html[data-theme="light"] .sl-ledger-banner strong { color: #293640; }
html[data-theme="light"] .sl-overlay { background: rgba(28,39,49,.45); }
html[data-theme="light"] .sl-drawer { background: #fff; color: #293640; border-left-color: #e6e5eb; box-shadow: -12px 0 36px rgba(28,39,49,.12); }
html[data-theme="light"] .sl-drawer-head,
html[data-theme="light"] .sl-drawer-foot,
html[data-theme="light"] .sl-detail-row { border-color: #e9e8ee; }
html[data-theme="light"] .sl-close,
html[data-theme="light"] .sl-detail-row span { color: #777481; }
html[data-theme="light"] .sl-close:hover { color: #293640; }
html[data-theme="light"] .sl-note { background: #f1f6ff; color: #617381; }
html[data-theme="light"] .sl-account-list { border-color: #e5e4eb; }
html[data-theme="light"] .sl-error { color: #bd414b; }

html[data-theme="light"] .tkt { color: #2c3842; }
html[data-theme="light"] .tkt-top h1 { color: #293640; }
html[data-theme="light"] .tkt-top p,
html[data-theme="light"] .tkt-field label,
html[data-theme="light"] .tkt-label,
html[data-theme="light"] .tkt-sub,
html[data-theme="light"] .tkt-grid span,
html[data-theme="light"] .tkt-section small { color: #777481; }
html[data-theme="light"] .tkt-hint { background: #fff; border-color: #e3e2ea; color: #777481; }
html[data-theme="light"] .tkt-card,
html[data-theme="light"] .tkt-panel { background: #fff; border-color: #e3e2eb; }
html[data-theme="light"] .tkt-number { color: #293640; }
html[data-theme="light"] .tkt-number.blue { color: #245bd6; }
html[data-theme="light"] .tkt input,
html[data-theme="light"] .tkt select,
html[data-theme="light"] .tkt textarea { color: #303b46; background: #fff; border-color: #d5ddea; }
html[data-theme="light"] .tkt input::placeholder,
html[data-theme="light"] .tkt textarea::placeholder { color: #9996a2; }
html[data-theme="light"] .tkt-btn { background: #f2f1f6; color: #56616c; }
html[data-theme="light"] .tkt-btn:hover { background: #e9e7f0; }
html[data-theme="light"] .tkt-btn.primary { background: #245bd6; color: #fff; }
html[data-theme="light"] .tkt-btn.primary:hover { background: #1b49b2; }
html[data-theme="light"] .tkt-tabs { border-color: #e9e8ee; }
html[data-theme="light"] .tkt-tab { color: #777481; }
html[data-theme="light"] .tkt-tab.active { color: #245bd6; border-color: #3470e8 !important; }
html[data-theme="light"] .tkt th { background: #f6f6f9; color: #777481; }
html[data-theme="light"] .tkt td,
html[data-theme="light"] .tkt th { border-color: #ecebf0; }
html[data-theme="light"] .tkt tbody tr:hover td { background: #f8f7fb; }
html[data-theme="light"] .tkt-link { color: #245bd6; }
html[data-theme="light"] .tkt-link:hover { color: #1b49b2; }
html[data-theme="light"] .tkt-pill { background: #fff3df; color: #9b651d; }
html[data-theme="light"] .tkt-pill.done { background: #e6f5ee; color: #19734f; }
html[data-theme="light"] .tkt-empty,
html[data-theme="light"] .tkt-footer,
html[data-theme="light"] .tkt-count { color: #888592; }
html[data-theme="light"] .tkt-footer { border-color: #ecebf0; }
html[data-theme="light"] .tkt-shade { background: #24344077; }
html[data-theme="light"] .tkt-drawer { background: #fff; color: #293640; box-shadow: -12px 0 36px #20303c20; }
html[data-theme="light"] .tkt-drawer-head,
html[data-theme="light"] .tkt-drawer-foot,
html[data-theme="light"] .tkt-section { border-color: #e8e7ed; }
html[data-theme="light"] .tkt-close { color: #777481; }
html[data-theme="light"] .tkt-close:hover { color: #293640; }
html[data-theme="light"] .tkt-source { background: #f9f8fb; border-color: #d9d8e2; color: #888592; }
html[data-theme="light"] .tkt-msg { color: #9b651d; }
html[data-theme="light"] .tkt-success { background: #e6f5ee; color: #19734f; }

html[data-theme="light"] .settings-chip { background: #e8f1ff; color: #245bd6; border-color: #dce8fa; }
html[data-theme="light"] .settings-preview { background: #f8f7fb; border-color: #e4e3ea; }
html[data-theme="light"] .settings-preview-title,
html[data-theme="light"] .settings-section-title { color: #293640; }
html[data-theme="light"] .settings-preview-body,
html[data-theme="light"] .settings-preview-body b { color: #47545f; }
html[data-theme="light"] .settings-label { color: #5c6975; }
html[data-theme="light"] .settings-empty { color: #888592; }
html[data-theme="light"] .settings-backdrop { background: rgba(28,39,49,.45); }
html[data-theme="light"] .settings-modal { background: #fff; color: #293640; border-color: #e4e3ea; box-shadow: 0 18px 50px #20303c22; }
html[data-theme="light"] .settings-modal-head,
html[data-theme="light"] .settings-modal-foot { border-color: #e8e7ed; }
html[data-theme="light"] .settings-close { color: #777481; }
html[data-theme="light"] .settings-close:hover { color: #293640; }
html[data-theme="light"] .text-action { color: #245bd6; }
html[data-theme="light"] .text-action:hover { color: #1b49b2; }
html[data-theme="light"] .settings-message { background: #fff; color: #45525d; border-color: #e0dfea; box-shadow: 0 8px 25px #20303c20; }
html[data-theme="light"] .settings-modal input,
html[data-theme="light"] .settings-modal select,
html[data-theme="light"] .settings-quote-layout input,
html[data-theme="light"] .settings-narrow input,
html[data-theme="light"] .settings-search input { background: #fff; color: #303b46; border-color: #d5ddea; color-scheme: light; }
html[data-theme="light"] .settings-modal input::placeholder,
html[data-theme="light"] .settings-narrow input::placeholder,
html[data-theme="light"] .settings-search input::placeholder { color: #9996a2; }
html[data-theme="light"] .settings-modal select option { background: #fff; color: #303b46; }
html[data-theme="light"] .settings-body .badge.good,
html[data-theme="light"] .settings-panel-top + .table-wrap .badge.good { color: #19734f; background: #e6f5ee; border-color: #cae8d9; }
html[data-theme="light"] .settings-body .badge.neutral,
html[data-theme="light"] .settings-panel-top + .table-wrap .badge.neutral { color: #777481; background: #f2f1f6; border-color: #e1e0e7; }

/* 动态模块沿用日间的中性色与强调色。 */
html[data-theme="light"] .list-pagination { color: #69717f; }
html[data-theme="light"] body .rz-region,
html[data-theme="light"] body .rz-amount { background: #fff; border-color: #dce3ee; color: #202b3b; }
html[data-theme="light"] body .rz-region:hover,
html[data-theme="light"] body .rz-amount:hover { border-color: #8bb0f4; }
html[data-theme="light"] body .rz-region.active,
html[data-theme="light"] body .rz-amount.active { background: #edf4ff; border-color: #8bb0f4; }
html[data-theme="light"] body .rz-region-code { background: #f1f4f8; color: #5a687b; }
html[data-theme="light"] body .rz-region.active .rz-region-code { background: #dceaff; color: #245bd6; }
html[data-theme="light"] body .sl-supplier-card,
html[data-theme="light"] body .tkt-card,
html[data-theme="light"] body .tkt-panel { background: #fff; border-color: #e2e8f1; box-shadow: 0 2px 8px rgba(31,39,54,.025); }
html[data-theme="light"] body .sl-table th,
html[data-theme="light"] body .tkt th { background: #f4f7fb; color: #626a78; }
html[data-theme="light"] body .sl-card-label,
html[data-theme="light"] body .sl-card-field > span:first-child,
html[data-theme="light"] body .sl-supplier-count,
html[data-theme="light"] body .tkt-label,
html[data-theme="light"] body .tkt-field label,
html[data-theme="light"] body .tkt-empty,
html[data-theme="light"] body .tkt-footer,
html[data-theme="light"] body .settings-empty { color: #666d7a; }
html[data-theme="light"] body .tkt-btn.primary { background: #245bd6; color: #fff; }
html[data-theme="light"] body .tkt-btn.primary:hover { background: #1b49b2; }
html[data-theme="light"] body .sl-field input::placeholder,
html[data-theme="light"] body .sl-dialog input::placeholder,
html[data-theme="light"] body .tkt input::placeholder,
html[data-theme="light"] body .tkt textarea::placeholder,
html[data-theme="light"] body .settings-modal input::placeholder,
html[data-theme="light"] body .settings-narrow input::placeholder,
html[data-theme="light"] body .settings-search input::placeholder { color: #707785; }

/* 动态插入的控件样式使用同一套日间强调色。 */
html[data-theme="light"] body .sl-card-avatar { background: #e8f1ff; color: #245bd6; border-color: #d2e1f8; }
html[data-theme="light"] body .sl-supplier-card:hover { border-color: #b6cdf4; }
html[data-theme="light"] body .sl-field input:focus,
html[data-theme="light"] body .sl-field select:focus,
html[data-theme="light"] body .sl-dialog input:focus,
html[data-theme="light"] body .sl-dialog select:focus,
html[data-theme="light"] body .settings-modal input:focus,
html[data-theme="light"] body .settings-modal select:focus,
html[data-theme="light"] body .settings-quote-layout input:focus,
html[data-theme="light"] body .settings-narrow input:focus,
html[data-theme="light"] body .settings-search input:focus,
html[data-theme="light"] body .tkt input:focus,
html[data-theme="light"] body .tkt select:focus,
html[data-theme="light"] body .tkt textarea:focus { border-color: #6a98ef; box-shadow: 0 0 0 2px rgba(36,91,214,.13); }
html[data-theme="light"] body .settings-supplier-option input { accent-color: #245bd6; }
html[data-theme="light"] body .tkt-number.blue,
html[data-theme="light"] body .tkt-link { color: #245bd6; }
html[data-theme="light"] body .tkt-link:hover { color: #1b49b2; }
html[data-theme="light"] body .tkt-tab.active { color: #245bd6; border-color: #3470e8 !important; }
html[data-theme="light"] body .tkt :focus-visible { outline-color: #3970e1; }
