/*
 * 春不晚工厂工作台浅色主题补全。
 * 只覆盖浅色模式的配色、边框和层级，不改变页面结构、字段和交互。
 */

html[data-theme="light"] body.factory-console {
  background-color: #f3f6fb;
  background-image:
    linear-gradient(rgba(22, 119, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 119, 255, 0.022) 1px, transparent 1px),
    radial-gradient(circle at 78% 0%, rgba(22, 119, 255, 0.07), transparent 34%);
  background-size: 32px 32px, 32px 32px, 100% 100%;
}

html[data-theme="light"] body.factory-console
  :is(#settingsPanel, #wodaSyncSection, #interceptsSection, #scanRemindersSection) {
  color: #172033;
}

html[data-theme="light"] body.factory-console
  :is(#wodaSyncSection, #interceptsSection, #scanRemindersSection) {
  border-color: #dce5ef;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(31, 55, 91, 0.07);
}

html[data-theme="light"] body.factory-console
  :is(#settingsPanel, #wodaSyncSection, #interceptsSection, #scanRemindersSection)
  :is(h2, h3) {
  color: #172033;
}

html[data-theme="light"] body.factory-console .settings-modal h2 {
  color: #172033;
}

html[data-theme="light"] body.factory-console
  :is(#settingsDept, #settingsEmp, #settingsEmpEdit, #wodaSyncSection, #interceptsSection, #scanRemindersSection)
  :is(input, select, textarea) {
  border-color: #d7e1ec;
  background: #ffffff;
  color: #172033;
  box-shadow: none;
}

html[data-theme="light"] body.factory-console
  :is(#settingsDept, #settingsEmp, #settingsEmpEdit, #wodaSyncSection, #interceptsSection, #scanRemindersSection)
  :is(input, textarea)::placeholder {
  color: #8a97a8;
  opacity: 1;
}

html[data-theme="light"] body.factory-console
  :is(#settingsDept, #settingsEmp, #settingsEmpEdit, #wodaSyncSection, #interceptsSection, #scanRemindersSection)
  :is(input, select, textarea):focus {
  border-color: #1677ff;
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.11);
}

html[data-theme="light"] body.factory-console
  :is(#settingsDept, #settingsEmp, #settingsEmpEdit, #wodaSyncSection, #interceptsSection, #scanRemindersSection)
  button:not(.secondary, .close-btn) {
  background: #1677ff;
  color: #ffffff;
}

html[data-theme="light"] body.factory-console
  :is(#settingsDept, #settingsEmp, #settingsEmpEdit, #wodaSyncSection, #interceptsSection, #scanRemindersSection)
  button:not(.secondary, .close-btn):hover {
  background: #0958d9;
}

html[data-theme="light"] body.factory-console
  :is(#settingsDept, #settingsEmp, #settingsEmpEdit, #wodaSyncSection, #interceptsSection, #scanRemindersSection)
  button.secondary {
  border: 1px solid #d7e1ec;
  background: #ffffff;
  color: #526071;
}

html[data-theme="light"] body.factory-console
  :is(#settingsDept, #settingsEmp, #settingsEmpEdit, #wodaSyncSection, #interceptsSection, #scanRemindersSection)
  button.secondary:hover {
  border-color: #91caff;
  background: #f0f7ff;
  color: #0958d9;
}

html[data-theme="light"] body.factory-console
  :is(#settingsDept, #settingsEmp, #settingsEmpEdit, #wodaSyncSection, #interceptsSection, #scanRemindersSection)
  table {
  border-color: #dce5ef;
  background: #ffffff;
}

html[data-theme="light"] body.factory-console
  :is(#settingsDept, #settingsEmp, #settingsEmpEdit, #wodaSyncSection, #interceptsSection, #scanRemindersSection)
  th {
  border-color: #dce5ef;
  background: #f6f8fb;
  color: #66758a;
}

html[data-theme="light"] body.factory-console
  :is(#settingsDept, #settingsEmp, #settingsEmpEdit, #wodaSyncSection, #interceptsSection, #scanRemindersSection)
  td {
  border-color: #e5ebf2;
  color: #273244;
}

html[data-theme="light"] body.factory-console
  :is(#settingsDept, #settingsEmp, #settingsEmpEdit, #wodaSyncSection, #interceptsSection, #scanRemindersSection)
  tr:hover {
  background: #f7faff;
}

html[data-theme="light"] body.factory-console
  :is(#settingsDept > .row:first-of-type, #settingsEmp > .row:first-of-type) {
  border-color: #dce5ef !important;
  background: #f8fafc !important;
}

html[data-theme="light"] body.factory-console #settingsDept > h2::before,
html[data-theme="light"] body.factory-console #settingsEmp > h2::before {
  color: #1677ff;
}

html[data-theme="light"] body.factory-console #settingsDept .card-list {
  border-color: #dce5ef;
  background: #ffffff;
}

html[data-theme="light"] body.factory-console #settingsDept .card-list > .row {
  border-color: #e6ecf3;
}

html[data-theme="light"] body.factory-console .employee-permission-box {
  border-color: #dce5ef;
  background: #f8fafc;
}

html[data-theme="light"] body.factory-console .employee-permission-title {
  color: #273244;
}

html[data-theme="light"] body.factory-console .employee-permission-options label {
  color: #526071;
}

html[data-theme="light"] body.factory-console .employee-role-tag {
  border-color: #cfe0f4;
  background: #eef6ff;
  color: #245b91;
}

html[data-theme="light"] body.factory-console
  :is(.sync-card, .sync-account-card, .source-module, .metric-card, .quick-card) {
  border-color: #dce5ef;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(31, 55, 91, 0.045);
}

html[data-theme="light"] body.factory-console .sync-account-heading,
html[data-theme="light"] body.factory-console .sync-account-status,
html[data-theme="light"] body.factory-console .sync-account-details .value {
  color: #273244;
}

html[data-theme="light"] body.factory-console .sync-account-error {
  border-color: #e5ebf2;
}

html[data-theme="light"] body.factory-console .source-badge.todo {
  background: #eef2f6;
  color: #66758a;
}

html[data-theme="light"] body.factory-console .date-filter-btn {
  border-color: #d7e1ec;
  background: #ffffff;
  color: #526071;
}

html[data-theme="light"] body.factory-console .date-filter-btn.active {
  border-color: #91caff;
  background: #f0f7ff;
  color: #0958d9;
}

html[data-theme="light"] body.factory-console .date-clear-btn {
  border-color: #d7e1ec;
  background: #f6f8fb;
  color: #66758a;
}

html[data-theme="light"] body.factory-console
  :is(.remark-modal, .date-range-modal, #loginBox, #sessionRestoreBox) {
  border-color: #dce5ef;
  background: #ffffff;
  color: #172033;
  box-shadow: 0 20px 55px rgba(31, 55, 91, 0.15);
}

html[data-theme="light"] body.factory-console #remarkInput {
  border-color: #d7e1ec;
  background: #ffffff;
  color: #172033;
}

html[data-theme="light"] body.factory-console .session-restore-spinner {
  border-color: #d9e3ee;
  border-top-color: #1677ff;
}

html[data-theme="light"] body.factory-console .workspace-frame-head {
  border-color: #dce5ef;
  background: #ffffff;
}

html[data-theme="light"] body.factory-console .workspace-frame-head button {
  border-color: #d7e1ec;
  background: #ffffff;
  color: #526071;
}

html[data-theme="light"] body.factory-console #workspaceFrame {
  background: #f3f6fb;
}

/* 客户管理 */
html[data-theme="light"].workspace-embed {
  color-scheme: light;
}

html[data-theme="light"] body.factory-customers-page {
  --bg-0: #f3f6fb;
  --bg-1: #ffffff;
  --bg-2: #ffffff;
  --bg-3: #eef3f8;
  --bg-hover: #f6f9fc;
  --line: #dce5ef;
  --line-strong: #cbd8e6;
  --text-1: #172033;
  --text-2: #59677a;
  --text-3: #7d8999;
  --accent: #1677ff;
  --accent-soft: #eaf3ff;
  --accent-glow: rgba(22, 119, 255, 0.18);
  --blue: #1677ff;
  --blue-soft: #eaf3ff;
  --shadow-card: 0 9px 26px rgba(31, 55, 91, 0.07);
  color-scheme: light;
  background:
    radial-gradient(700px 320px at 12% -5%, rgba(22, 119, 255, 0.07), transparent 62%),
    #f3f6fb;
}

html[data-theme="light"] body.factory-customers-page header {
  border-color: #dce5ef;
  background: rgba(255, 255, 255, 0.94);
}

html[data-theme="light"] body.factory-customers-page .panel,
html[data-theme="light"] body.factory-customers-page .metric,
html[data-theme="light"] body.factory-customers-page .login-card {
  border-color: #dce5ef;
  background: #ffffff;
}

html[data-theme="light"] body.factory-customers-page .panel-foot {
  border-color: #dce5ef;
  background: #f8fafc;
}

html[data-theme="light"] body.factory-customers-page :is(input, textarea, select) {
  border-color: #cbd8e6;
  background: #ffffff;
  color: #172033;
}

html[data-theme="light"] body.factory-customers-page button.primary {
  background: #1677ff;
  color: #ffffff;
  box-shadow: 0 4px 13px rgba(22, 119, 255, 0.2);
}

html[data-theme="light"] body.factory-customers-page button.primary:hover {
  background: #0958d9;
}

html[data-theme="light"] body.factory-customers-page button.secondary {
  border-color: #d7e1ec;
  background: #ffffff;
  color: #526071;
}

html[data-theme="light"] body.factory-customers-page button.secondary:hover,
html[data-theme="light"] body.factory-customers-page button.ghost:hover {
  border-color: #91caff;
  background: #f0f7ff;
  color: #0958d9;
}

html[data-theme="light"] body.factory-customers-page thead th {
  border-color: #dce5ef;
  background: #f6f8fb;
}

html[data-theme="light"] body.factory-customers-page tbody td {
  border-color: #e5ebf2;
}

html[data-theme="light"] body.factory-customers-page .metric::after {
  background: linear-gradient(90deg, transparent, rgba(22, 119, 255, 0.16), transparent);
}

html[data-theme="light"] body.factory-customers-page
  :is(.check-card, .detail-item, .detail-list) {
  border-color: #dce5ef;
  background: #f8fafc;
}

html[data-theme="light"] body.factory-customers-page .pill-gray {
  background: #eef2f6;
  color: #66758a;
}

html[data-theme="light"] body.factory-customers-page .tag.green {
  color: #087f5b;
}

html[data-theme="light"] body.factory-customers-page .tag.red {
  color: #c9363e;
}

html[data-theme="light"] body.factory-customers-page .tag.yellow {
  color: #9a6700;
}

html[data-theme="light"] body.factory-customers-page ::-webkit-scrollbar-thumb {
  border-color: #f3f6fb;
  background: #c8d3df;
}

/* 快递工作台外壳 */
html[data-theme="light"] body.factory-express-hub {
  --bg: #f3f6fb;
  --panel: #ffffff;
  --panel-soft: #f5f8fc;
  --line: #dce5ef;
  --text: #172033;
  --muted: #66758a;
  --cyan: #1677ff;
  --green: #13a474;
  color-scheme: light;
  background: #f3f6fb;
}

html[data-theme="light"] body.factory-express-hub
  :is(.hero, .tabbar, .workspace) {
  border-color: #dce5ef;
  background: #ffffff;
  box-shadow: 0 9px 26px rgba(31, 55, 91, 0.06);
}

html[data-theme="light"] body.factory-express-hub .hero {
  background:
    radial-gradient(circle at 90% 0%, rgba(22, 119, 255, 0.08), transparent 36%),
    #ffffff;
}

html[data-theme="light"] body.factory-express-hub .hero small,
html[data-theme="light"] body.factory-express-hub .workspace-state {
  color: #1677ff !important;
}

html[data-theme="light"] body.factory-express-hub .tab:hover {
  background: #f3f7fc;
  color: #172033;
}

html[data-theme="light"] body.factory-express-hub .tab.active {
  border-color: #91caff;
  background: #eaf3ff;
  color: #0958d9;
}

html[data-theme="light"] body.factory-express-hub .workspace-head {
  border-color: #dce5ef;
}

html[data-theme="light"] body.factory-express-hub iframe {
  background: #f3f6fb;
}

/* 工厂快递查询内页 */
html.factory-express-workspace[data-theme="light"] body.customer-express-page {
  --customer-panel: #ffffff;
  --customer-panel-strong: #f8fafc;
  --customer-line: #dce5ef;
  --red: #1677ff;
  --red-soft: #eaf3ff;
  color: #172033;
  color-scheme: light;
  background-color: #f3f6fb !important;
  background-image:
    linear-gradient(rgba(22, 119, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 119, 255, 0.022) 1px, transparent 1px) !important;
}

html.factory-express-workspace[data-theme="light"]
  body.customer-express-page
  :is(.query-panel, .results-panel, .sync-panel) {
  border-color: #dce5ef !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

html.factory-express-workspace[data-theme="light"]
  body.customer-express-page
  :is(textarea, .pager button, .pager select, .pager input) {
  border-color: #cbd8e6 !important;
  background: #ffffff !important;
  color: #172033 !important;
}

html.factory-express-workspace[data-theme="light"]
  body.customer-express-page
  textarea::placeholder {
  color: #8a97a8;
}

html.factory-express-workspace[data-theme="light"]
  body.customer-express-page
  .btn {
  border-color: #d7e1ec;
  background: #ffffff;
  color: #526071;
}

html.factory-express-workspace[data-theme="light"]
  body.customer-express-page
  .btn.primary {
  border-color: #1677ff;
  background: linear-gradient(135deg, #1677ff, #23b7cb);
  color: #ffffff;
}

html.factory-express-workspace[data-theme="light"]
  body.customer-express-page
  .tabs {
  border-bottom-color: #dce5ef;
}

html.factory-express-workspace[data-theme="light"]
  body.customer-express-page
  .tab {
  color: #66758a;
}

html.factory-express-workspace[data-theme="light"]
  body.customer-express-page
  .tab.active {
  border-bottom-color: #1677ff;
  color: #0958d9;
}

html.factory-express-workspace[data-theme="light"]
  body.customer-express-page
  .tab
  .badge {
  background: #eef2f6;
  color: #66758a;
}

html.factory-express-workspace[data-theme="light"]
  body.customer-express-page
  .tab.active
  .badge {
  background: #eaf3ff;
  color: #0958d9;
}

html.factory-express-workspace[data-theme="light"]
  body.customer-express-page
  .result-item {
  border-color: #dce5ef;
  background: #ffffff;
}

html.factory-express-workspace[data-theme="light"]
  body.customer-express-page
  .detail {
  border-top-color: #dce5ef;
  background: #f8fafc;
}

html.factory-express-workspace[data-theme="light"]
  body.customer-express-page
  :is(.info-cell, .trace, .sync-stat) {
  border-color: #e1e8f0;
  background: #ffffff;
}

html.factory-express-workspace[data-theme="light"]
  body.customer-express-page
  :is(.info-value, .trace-desc, .latest-desc, .sync-title, .sync-value) {
  color: #273244;
}

html.factory-express-workspace[data-theme="light"]
  body.customer-express-page
  :is(.empty, .message, .sync-log, .sync-label) {
  color: #66758a;
}

html.factory-express-workspace[data-theme="light"]
  body.customer-express-page
  .timeline::before {
  background: #d5dfeb;
}

html.factory-express-workspace[data-theme="light"]
  body.customer-express-page
  .express-detail-panel {
  border-color: #dce5ef !important;
  background: #ffffff !important;
  box-shadow: 0 8px 24px rgba(31, 55, 91, 0.055);
}

html.factory-express-workspace[data-theme="light"]
  body.customer-express-page
  .express-empty-icon {
  border-color: #cfe0f4;
  background: #eef6ff;
  color: #1677ff;
}

html.factory-express-workspace[data-theme="light"]
  body.customer-express-page
  .express-empty-state strong,
html.factory-express-workspace[data-theme="light"]
  body.customer-express-page
  .express-detail-head h2,
html.factory-express-workspace[data-theme="light"]
  body.customer-express-page
  .compact-summary,
html.factory-express-workspace[data-theme="light"]
  body.customer-express-page
  .compact-summary .tracking-no {
  color: #172033;
}

html.factory-express-workspace[data-theme="light"]
  body.customer-express-page
  .express-detail-head {
  border-color: #dce5ef;
}

html.factory-express-workspace[data-theme="light"]
  body.customer-express-page
  .express-detail-no,
html.factory-express-workspace[data-theme="light"]
  body.customer-express-page
  .express-latest::before {
  color: #1677ff;
}

html.factory-express-workspace[data-theme="light"]
  body.customer-express-page
  .express-latest {
  border-color: #b9d7ff;
  background: #f0f7ff;
}

html.factory-express-workspace[data-theme="light"]
  body.customer-express-page
  .express-latest strong,
html.factory-express-workspace[data-theme="light"]
  body.customer-express-page
  .express-detail-panel .trace-desc {
  color: #273244;
}

html.factory-express-workspace[data-theme="light"]
  body.customer-express-page
  .compact-summary {
  background: #ffffff;
}

html.factory-express-workspace[data-theme="light"]
  body.customer-express-page
  .compact-summary:hover {
  background: #f6f9fc;
}

html.factory-express-workspace[data-theme="light"]
  body.customer-express-page
  .express-detail-panel .trace {
  border-color: #dce5ef;
  background: #f8fafc;
}

html.factory-express-workspace[data-theme="light"]
  body.customer-express-page
  .express-detail-panel .trace::before {
  border-color: #ffffff;
}

/* 快递同步设置 */
html[data-theme="light"] body.factory-express-sync {
  --bg: #f3f6fb;
  --panel: #ffffff;
  --line: #dce5ef;
  --line-soft: #e8edf3;
  --text: #172033;
  --muted: #66758a;
  --red: #1677ff;
  --red-soft: #eaf3ff;
  --blue: #1677ff;
  --green: #138a47;
  --amber: #9a6700;
  --danger: #c9363e;
  color-scheme: light;
  background: #f3f6fb;
}

html[data-theme="light"] body.factory-express-sync
  :is(.sync-panel, .query-panel, .results-panel) {
  border-color: #dce5ef;
  background: #ffffff;
  box-shadow: 0 9px 26px rgba(31, 55, 91, 0.06);
}

html[data-theme="light"] body.factory-express-sync
  :is(.sync-stat, .info-cell, .trace, .result-item) {
  border-color: #e1e8f0;
  background: #f8fafc;
}

html[data-theme="light"] body.factory-express-sync
  :is(textarea, input, .btn) {
  border-color: #d7e1ec;
  background: #ffffff;
  color: #172033;
}

html[data-theme="light"] body.factory-express-sync .btn.primary {
  border-color: #1677ff;
  background: #1677ff;
  color: #ffffff;
}

html[data-theme="light"] body.factory-express-sync .btn:hover:not(:disabled) {
  border-color: #91caff;
  background: #f0f7ff;
}

html[data-theme="light"] body.factory-express-sync .btn.primary:hover:not(:disabled) {
  border-color: #0958d9;
  background: #0958d9;
}

html[data-theme="light"] body.factory-express-sync .summary-row {
  background: #ffffff;
  color: #172033;
}

html[data-theme="light"] body.factory-express-sync .summary-row:hover {
  background: #f6f9fc;
}

html[data-theme="light"] body.factory-express-sync .detail {
  border-color: #e5ebf2;
  background: #f8fafc;
}

html[data-theme="light"] body.factory-express-sync .timeline::before {
  background: #d5dfeb;
}

html[data-theme="light"] body.factory-express-sync .trace::before {
  border-color: #f8fafc;
}

html[data-theme="light"] body.factory-express-sync .not-found {
  border-color: #ffc1c5;
  background: #fff3f4;
  color: #a61d24;
}

/* 智能客服 */
html[data-theme="light"] body.factory-robot-service {
  --bg: #f3f6fb;
  --panel: #ffffff;
  --panel-strong: #f5f8fc;
  --line: #dce5ef;
  --text: #172033;
  --muted: #66758a;
  --green: #13a474;
  --cyan: #1677ff;
  color-scheme: light;
  background:
    radial-gradient(circle at 85% 0%, rgba(22, 119, 255, 0.07), transparent 32%),
    #f3f6fb;
}

html[data-theme="light"] body.factory-robot-service section,
html[data-theme="light"] body.factory-robot-service .service-tabs {
  border-color: #dce5ef;
  background: #ffffff;
  box-shadow: 0 9px 26px rgba(31, 55, 91, 0.06);
}

html[data-theme="light"] body.factory-robot-service .hero {
  background:
    radial-gradient(circle at 92% 0%, rgba(22, 119, 255, 0.09), transparent 38%),
    #ffffff;
}

html[data-theme="light"] body.factory-robot-service .eyebrow {
  color: #1677ff;
}

html[data-theme="light"] body.factory-robot-service .phase,
html[data-theme="light"] body.factory-robot-service .service-panel-state {
  border-color: #b9d7ff;
  background: #eaf3ff;
  color: #0958d9;
}

html[data-theme="light"] body.factory-robot-service .service-tab:hover {
  background: #f3f7fc;
  color: #172033;
}

html[data-theme="light"] body.factory-robot-service .service-tab.active {
  border-color: #91caff;
  background: #eaf3ff;
  color: #0958d9;
}

html[data-theme="light"] body.factory-robot-service .metric small {
  color: #7d8999;
}

html[data-theme="light"] body.factory-robot-service .roadmap-card {
  border-color: #dce5ef;
  background: #f8fafc;
}

html[data-theme="light"] body.factory-robot-service .roadmap-card b {
  background: #eaf3ff;
  color: #1677ff;
}

html[data-theme="light"] body.factory-robot-service .handoff a {
  border-color: #b9d7ff;
  background: #eaf3ff;
  color: #0958d9;
}
