/* Shared light theme fixes loaded after page-specific inline styles. */

[data-theme="light"] body {
  --light-shell: #fffefa;
  --light-main: #fbfaf7;
  --light-sidebar: #f4f3ef;
  --light-panel: #fffefb;
  --light-panel-muted: #f3f1ec;
  --light-panel-muted-strong: #ebe8e1;
  --light-line: rgba(58, 52, 44, .14);
  --light-line-strong: rgba(58, 52, 44, .22);
  --light-muted: #6b6258;
  --light-blue: #1f6fbf;
  --light-blue-bg: #e8f2fb;
  --light-blue-bg-hover: #f1f7fc;
  --light-blue-brd: #b7d4ed;
}

[data-theme="light"] .topbar,
[data-theme="light"] .workspace-nav,
[data-theme="light"] .bbar,
[data-theme="light"] .chat-input {
  background: var(--light-shell);
  border-color: var(--light-line);
}

[data-theme="light"] .main,
[data-theme="light"] .cta {
  background: var(--light-main);
}

[data-theme="light"] .sidebar {
  background: var(--light-sidebar);
  border-color: rgba(58, 52, 44, .16);
}

[data-theme="light"] .card,
[data-theme="light"] .hero,
[data-theme="light"] .review,
[data-theme="light"] .section,
[data-theme="light"] .dropzone,
[data-theme="light"] .file-loaded,
[data-theme="light"] .analysis-modal,
[data-theme="light"] .toolcall,
[data-theme="light"] .tool-hover,
[data-theme="light"] .msg--agent .msg__content,
[data-theme="light"] .turn__response--note {
  background: var(--light-panel);
  border-color: var(--light-line);
  box-shadow: var(--sh);
}

[data-theme="light"] .editor__section,
[data-theme="light"] .metric,
[data-theme="light"] .context__body,
[data-theme="light"] .detail__row,
[data-theme="light"] .detail__group,
[data-theme="light"] .toolcall__head,
[data-theme="light"] .toolcall__body,
[data-theme="light"] .json,
[data-theme="light"] .brief,
[data-theme="light"] .info-card,
[data-theme="light"] .tech-card,
[data-theme="light"] .ai-card,
[data-theme="light"] .wf-note,
[data-theme="light"] .wf-summary__card,
[data-theme="light"] .custom-assistant-card,
[data-theme="light"] .wf-editor-card,
[data-theme="light"] .inspector-pipeline__card {
  background: var(--light-panel-muted);
  border-color: var(--light-line);
}

[data-theme="light"] .detail__group-head,
[data-theme="light"] .review__tabs,
[data-theme="light"] .sb__head,
[data-theme="light"] .srv,
[data-theme="light"] .history,
[data-theme="light"] .sb__root__head,
[data-theme="light"] .dg__head {
  background: #f8f7f3;
  border-color: var(--light-line);
}

[data-theme="light"] .sb__root__head:hover,
[data-theme="light"] .dg__head:hover,
[data-theme="light"] .detail__group-head:hover {
  background: #fff;
  border-color: var(--light-line-strong);
}

[data-theme="light"] input,
[data-theme="light"] textarea,
[data-theme="light"] select,
[data-theme="light"] .sb__search,
[data-theme="light"] .chat-input__field {
  background-color: #fff;
  border-color: rgba(58, 52, 44, .18);
}

[data-theme="light"] input:focus,
[data-theme="light"] textarea:focus,
[data-theme="light"] select:focus,
[data-theme="light"] .chat-input__field:focus {
  border-color: var(--light-blue);
  box-shadow: 0 0 0 2px rgba(31, 111, 191, .14);
}

[data-theme="light"] .btn-primary,
[data-theme="light"] .btn--primary,
[data-theme="light"] .cta-btn--primary,
[data-theme="light"] .chat-input__send,
[data-theme="light"] .url-row button,
[data-theme="light"] .paste-area button {
  background: var(--acc);
  color: #fff;
}

[data-theme="light"] .btn-primary:hover:not(:disabled),
[data-theme="light"] .btn--primary:hover,
[data-theme="light"] .cta-btn--primary:hover,
[data-theme="light"] .chat-input__send:hover,
[data-theme="light"] .url-row button:hover,
[data-theme="light"] .paste-area button:hover {
  filter: brightness(.95);
}

[data-theme="light"] .btn-ghost-sm,
[data-theme="light"] .btn--ghost,
[data-theme="light"] .cta-btn--secondary,
[data-theme="light"] .srv__btn,
[data-theme="light"] .fbtn {
  background: #fffefa;
  border-color: rgba(58, 52, 44, .20);
  color: var(--tx2);
}

[data-theme="light"] .btn-ghost-sm:hover:not(:disabled),
[data-theme="light"] .btn--ghost:hover,
[data-theme="light"] .cta-btn--secondary:hover,
[data-theme="light"] .srv__btn:hover:not(:disabled),
[data-theme="light"] .fbtn:hover:not(:disabled) {
  background: var(--accbg);
  border-color: var(--acch);
  color: var(--acc);
}

[data-theme="light"] .sb__filters,
[data-theme="light"] .tab__count,
[data-theme="light"] .softpill,
[data-theme="light"] .chip,
[data-theme="light"] .info-pill,
[data-theme="light"] .tool-hover__chip,
[data-theme="light"] .section__badge,
[data-theme="light"] .stat,
[data-theme="light"] .pc__loc,
[data-theme="light"] .pc__type,
[data-theme="light"] .pc-group__type,
[data-theme="light"] .inspector-badge {
  background: var(--light-panel-muted-strong);
  border-color: var(--light-line);
  color: var(--tx2);
}

[data-theme="light"] .sf--on,
[data-theme="light"] .ti--on,
[data-theme="light"] .sbi--on,
[data-theme="light"] .tab--active .tab__count,
[data-theme="light"] .opt-card:has(.opt-card__input:checked) {
  background: var(--light-blue-bg);
  border-color: var(--light-blue-brd);
  box-shadow: inset 0 0 0 1px rgba(31, 111, 191, .08);
}

[data-theme="light"] .ti--on::after,
[data-theme="light"] .sbi--on::before {
  background: var(--light-blue);
}

[data-theme="light"] .ti:hover,
[data-theme="light"] .sbi:hover,
[data-theme="light"] .opt-card:hover,
[data-theme="light"] .sug:hover {
  background: #efede7;
  border-color: rgba(58, 52, 44, .10);
}

[data-theme="light"] .sb__root__body,
[data-theme="light"] .dg__body {
  border-left-color: rgba(58, 52, 44, .18);
}

[data-theme="light"] .ti + .ti,
[data-theme="light"] .sbi + .sbi {
  box-shadow: inset 0 1px 0 rgba(58, 52, 44, .08);
}

[data-theme="light"] .ti::before {
  background: rgba(58, 52, 44, .18);
}

[data-theme="light"] .ti__type,
[data-theme="light"] .ti__method--post,
[data-theme="light"] .tool-head__method--post,
[data-theme="light"] .tool-hover__badge.ti__method--post {
  background: #dcebf7;
  border-color: #c5dcec;
  color: #245f8d;
}

[data-theme="light"] .ti__method--get,
[data-theme="light"] .tool-head__method--get,
[data-theme="light"] .tool-hover__badge.ti__method--get {
  background: #dff0e4;
  border-color: #bfdfc9;
  color: #1f6b3a;
}

[data-theme="light"] .ti__method--del,
[data-theme="light"] .tool-head__method--del,
[data-theme="light"] .tool-hover__badge.ti__method--del {
  background: #f6dfdc;
  border-color: #ebc0bb;
  color: #a53a32;
}

[data-theme="light"] .ti__method--put,
[data-theme="light"] .tool-head__method--put,
[data-theme="light"] .tool-head__method--patch,
[data-theme="light"] .tool-hover__badge.ti__method--put,
[data-theme="light"] .tool-hover__badge.ti__method--patch {
  background: #f3e4c9;
  border-color: #e0c999;
  color: #7b561c;
}

[data-theme="light"] .ti__method--workflow,
[data-theme="light"] .tool-head__method--workflow,
[data-theme="light"] .tool-hover__badge.ti__method--workflow {
  background: #eadffb;
  border-color: #d8c6f4;
  color: #6d28d9;
}

[data-theme="light"] .ti__method--custom,
[data-theme="light"] .tool-head__method--custom,
[data-theme="light"] .tool-hover__badge.ti__method--custom {
  background: #f8e2d9;
  border-color: #edc6b9;
  color: #a34726;
}

[data-theme="light"] .ti__source,
[data-theme="light"] .sbi__hint,
[data-theme="light"] .dg__meta,
[data-theme="light"] .sb__root__meta,
[data-theme="light"] .bbar__costs,
[data-theme="light"] .topbar__proj,
[data-theme="light"] .card__hint,
[data-theme="light"] .helptext,
[data-theme="light"] .chat-input__hint,
[data-theme="light"] .toolcall__meta,
[data-theme="light"] .toolcall__time {
  color: var(--light-muted);
}

[data-theme="light"] .mode-note--warning,
[data-theme="light"] .chip--warn,
[data-theme="light"] .info-pill--warn {
  background: #f7ecd4;
  border-color: #e2c78f;
  color: #7b561c;
}

[data-theme="light"] .status--success,
[data-theme="light"] .info-pill--ok,
[data-theme="light"] .ti__copy--done {
  background: #dff0e4;
  border-color: #bfdfc9;
  color: #1f6b3a;
}

[data-theme="light"] .status--error,
[data-theme="light"] .info-pill--err,
[data-theme="light"] .ti__copy--err {
  background: #f6dfdc;
  border-color: #ebc0bb;
  color: #a53a32;
}

[data-theme="light"] .tp-card {
  background: var(--light-panel);
  border-color: var(--light-line);
  box-shadow: var(--sh);
}

[data-theme="light"] .tp-card:hover {
  box-shadow: var(--shl);
}

[data-theme="light"] .tp-card__badge {
  background: var(--light-panel-muted);
  border-color: var(--light-line);
  color: var(--tx2);
}

[data-theme="light"] .tool-col--code,
[data-theme="light"] .inspector-panel,
[data-theme="light"] .custom-tools__body {
  background: #f6f4ef;
  border-color: var(--light-line);
}

[data-theme="light"] .inspector-pipeline__row--current .inspector-pipeline__card {
  background: #fff4e8;
  border-color: var(--acch);
}

[data-theme="light"] .msg--user .msg__content {
  background: var(--acc);
  color: #fff;
}

[data-theme="light"] .msg--user .msg__content code {
  background: rgba(255, 255, 255, .18);
  color: #fff;
}
