/* SH V3: isolated visual-only day/night repair. Loaded AFTER existing styles.
   No invoice, matching, authorization or model logic is modified. */
html[data-theme="light"] {
  color-scheme: light;
  --ink:#17334b; --teal:#087d79; --bg:#f4f8fc;
  --white:#fff; --panel:#fff; --surface:#f3f8fb;
  --surface-alt:#edf4f9; --table-head:#eaf2f7;
  --muted:#5b7187; --line:#d4e2ec; --chip:#dff5ef;
  --hover:#eaf7f5; --shadow:0 8px 26px rgba(32,70,102,.07);
}
html[data-theme="light"] body {background:#f4f8fc;color:var(--ink)}
html[data-theme="light"] .site-header.sh-topbar {
  background:linear-gradient(105deg,#eef8fc 0%,#e9f2f9 55%,#e7f5f3 100%);
  border-bottom:1px solid #c9e3e8;color:#17364b;
  box-shadow:0 2px 12px rgba(34,93,121,.07);
}
html[data-theme="light"] .sh-brand-copy strong {color:#14374c}
html[data-theme="light"] .sh-brand-copy small {color:#617d90}
html[data-theme="light"] .sh-greeting strong {color:#16384d}
html[data-theme="light"] .sh-greeting small {color:#087e71}
html[data-theme="light"] .sh-header-left .sh-settings-btn,
html[data-theme="light"] .sh-header-left .theme-toggle {background:#fff;border-color:#bed2df;color:#25435a}
html[data-theme="light"] .sh-header-left .sh-new-btn {background:#e5fbf5!important;color:#087966!important;border-color:#16a38d!important}
html[data-theme="light"] .sh-header-left .sh-new-btn:hover {background:#c9f5e7!important}
html[data-theme="light"] .sh-logout {background:#fff2f3;color:#af3048;border-color:#d9798e}
html[data-theme="light"] .sh-logout:hover {background:#ffe4e8;color:#8c1b36}
html[data-theme="light"] .control-group {background:#e2edf4;border:1px solid #c9d9e3}
html[data-theme="light"] .control-group .utility-toggle {color:#35536a;background:transparent}
html[data-theme="light"] .control-group .utility-toggle.is-selected {color:#075f60;background:#fff;border-color:#c0d9dc}
html[data-theme="light"] #themeIcon {color:#5275b1}
html[data-theme="light"] .hero {
  background:linear-gradient(104deg,#e7f3fc,#e4f4f2 54%,#d0f1e6)!important;
  border-color:#bedddf;color:#154657;
}
html[data-theme="light"] .hero-caption{color:#07776e}
html[data-theme="light"] .hero h1,
html[data-theme="light"] .hero h1 span,
html[data-theme="light"] .hero h1 .hero-highlight {color:#056e72!important}
html[data-theme="light"] .hero p {color:#456778!important}
html[data-theme="light"] .hero .hero-sh-watermark {color:#149f9e;opacity:.12}
html[data-theme="light"] .sh-upload-card {
  background:#fff!important;border-color:#35a88c!important;
  box-shadow:0 6px 22px rgba(30,90,105,.045);
}
html[data-theme="light"] .sh-upload-card:hover {background:#f5fffc!important}
html[data-theme="light"] .sh-upload-card.is-paste-target {
  background:#e8fbf6!important;border-color:#06b7a1!important;
  box-shadow:0 0 0 2px rgba(8,163,147,.15);
}
html[data-theme="light"] .sh-upload-title h3 {color:#183c4c}
html[data-theme="light"] .sh-upload-card .upload-icon {background:#ddf7ed;color:#067c6e;border-color:#b8dfd0}
html[data-theme="light"] .sh-clear {color:#5f7786}
html[data-theme="light"] .sh-clear:hover {color:#007e74}
html[data-theme="light"] .sh-upload-cloud {border-color:#bfd7e2;color:#0b9e83}
html[data-theme="light"] .sh-upload-center p {color:#47697d}
html[data-theme="light"] .sh-upload-center small {color:#637f90}
html[data-theme="light"] .sh-pick {background:#f4f9fc;color:#214459;border-color:#c6d8e3}
html[data-theme="light"] .sh-pick:hover {background:#e3f6ee;border-color:#26a58d}
html[data-theme="light"] .sh-upload-bottom {border-top-color:#d6e6ed}
html[data-theme="light"] .sh-file-summary {color:#078775}
html[data-theme="light"] .sh-upload-card .file-entry {background:#e8f8f1;color:#174d40;border-color:#c3e6d8}
html[data-theme="light"] .sh-file-size {color:#577b70}
html[data-theme="light"] .sh-file-remove {background:#fff0f1;color:#9b3651;border-color:#e5a5ad}
html[data-theme="light"] .sh-engine-card {background:#fff;border-color:#d0e1e8}
html[data-theme="light"] .sh-engine-card>span {color:#31536b}
html[data-theme="light"] .sh-engine-card select {background:#f6fafd;color:#193d52;border-color:#c8d9e2}
html[data-theme="light"] .sh-engine-card small {color:#607b8d}
html[data-theme="light"] .sh-engine-card.is-running {background:#dff7ef;border-color:#27aa91;box-shadow:inset 0 0 0 1px #5ecdb5}
html[data-theme="light"] .sh-engine-card.is-running small {color:#077964}
html[data-theme="light"] .sh-engine-current {color:#087e73}
html[data-theme="light"] .sh-key-link {background:#f3f8fc;border-color:#c5d8e3;color:#2a5167}
html[data-theme="light"] .sh-key-link:hover {border-color:#15978c}
html[data-theme="light"] .sh-settings-dialog {background:#fff;color:#19384b;border-color:#c6d9e5}
html[data-theme="light"] .sh-dialog-head {border-bottom-color:#dbe6ef}
html[data-theme="light"] .sh-dialog-head p {color:#6a7e8d}
html[data-theme="light"] .sh-dialog-head button {color:#507188}
html[data-theme="light"] .sh-key-input {background:#f6f9fc;border-color:#d1e0e8}
html[data-theme="light"] .sh-key-input input {color:#163d50}
html[data-theme="light"] .sh-key-input button {background:#e9f2f8;color:#24465b}
html[data-theme="light"] .sh-key-help {color:#5d788b}
html[data-theme="light"] .sh-admin-panel {border-top-color:#dbe6ee}
html[data-theme="light"] .sh-admin-panel p {color:#5d788b}
html[data-theme="light"] .sh-admin-form input {background:#f5f9fc;color:#163d50;border-color:#ccdae4}
html[data-theme="light"] .sh-user-row {border-bottom-color:#dce6eb}
html[data-theme="light"] .sh-user-row button {background:#f1f7fa;color:#30566e;border-color:#c9dbe7}
/* Existing dark styles already cover the rest of the app; restore the configuration
   panel's dark surface so the dark theme is consistent too. */
html[data-theme="dark"] .config-grid {background:#111f31;border-color:#2c4155}
/* Buttons should expose a clear keyboard focus state in both modes. */
#themeToggle:focus-visible {outline:3px solid #21c8b7;outline-offset:3px}
