/* CalderThorn light-mode compatibility layer.
   IMPORTANT: every visual rule is scoped to html[data-theme="light"].
   Dark mode is intentionally untouched. */

html[data-theme="light"]{
  color-scheme: light;
  --bg:#f7f8fb;
  --bg-2:#ffffff;
  --panel:#ffffff;
  --panel-2:#f4f6f9;
  --card:#ffffff;
  --fg:#172033;
  --text:#172033;
  --muted:#5f6b7a;
  --border:#dfe3ec;
  --line:#dfe3ec;
  --line2:#cfd6e2;
  --blue:#245fb8;
}

html[data-theme="light"] input[type="file"]{
  color:#4b5565;
  background:#fff;
}
html[data-theme="light"] input[type="file"]::file-selector-button{
  appearance:none;
  margin-right:10px;
  padding:8px 11px;
  border:1px solid #cfd6e2;
  border-radius:9px;
  background:#f4f6f9;
  color:#172033;
  font-weight:650;
  cursor:pointer;
}
html[data-theme="light"] input[type="file"]::file-selector-button:hover{
  background:#e9edf3;
  border-color:#b8c2d0;
}

html[data-theme="light"] body{
  background:#f7f8fb;
  color:#172033;
}
html[data-theme="light"] body > header:not(.kb-header):not(.sh-header){
  background:#fff;
  color:#172033;
  border-color:#dfe3ec;
}
html[data-theme="light"] .card{
  background:#fff;
  color:#172033;
  border-color:#dfe3ec;
  box-shadow:0 8px 26px rgba(15,23,42,.05);
}
html[data-theme="light"] .card h1,
html[data-theme="light"] .card h2,
html[data-theme="light"] .card h3,
html[data-theme="light"] header h1,
html[data-theme="light"] header h2{
  color:#172033;
}
html[data-theme="light"] .muted,
html[data-theme="light"] .small.muted,
html[data-theme="light"] th{
  color:#5f6b7a;
}
html[data-theme="light"] .btn:not(.btn--primary):not(.btn--danger):not(.btn-primary):not(.btn-danger){
  background:#f8fafc !important;
  color:#172033 !important;
  border-color:#cfd6e2 !important;
}
html[data-theme="light"] .btn:not(.btn--primary):not(.btn--danger):not(.btn-primary):not(.btn-danger):hover:not(:disabled){
  background:#eef2f7 !important;
  border-color:#aeb9c8 !important;
}
html[data-theme="light"] .btn.btn-primary{
  background:#eaf2ff !important;
  color:#174a91 !important;
  border-color:#9cbbe5 !important;
}
html[data-theme="light"] .btn.btn-danger{
  background:#fff7f7 !important;
  color:#a13d3d !important;
  border-color:#e8b7b7 !important;
}
html[data-theme="light"] input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
html[data-theme="light"] select,
html[data-theme="light"] textarea{
  background:#fff !important;
  color:#172033 !important;
  border-color:#cfd6e2 !important;
}
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder{
  color:#7b8796 !important;
}
html[data-theme="light"] table{
  color:#172033;
}
html[data-theme="light"] th,
html[data-theme="light"] td{
  border-color:#e2e7ef !important;
}
html[data-theme="light"] tr:hover td{
  background:rgba(37,99,235,.025);
}

html[data-theme="light"] .context-strip{
  background:#f8fafc;
  border-color:#dfe3ec;
  color:#172033;
}
html[data-theme="light"] .scope-badge,
html[data-theme="light"] .badge,
html[data-theme="light"] .fixed,
html[data-theme="light"] .status-pill{
  background:#f8fafc;
  color:#445164;
  border-color:#cfd6e2;
}
html[data-theme="light"] .setting-line{
  border-color:#e2e7ef;
}
html[data-theme="light"] .setting-track,
html[data-theme="light"] .hq-switch-track{
  background:#cbd5e1;
  border-color:#b9c5d3;
}
html[data-theme="light"] .setting-track::after,
html[data-theme="light"] .hq-switch-track::after{
  background:#fff;
  box-shadow:0 1px 3px rgba(15,23,42,.18);
}
html[data-theme="light"] .setting-switch input:checked + .setting-track,
html[data-theme="light"] .hq-switch input:checked + .hq-switch-track{
  background:#168060;
  border-color:#168060;
}

html[data-theme="light"] .b-ok{
  background:#edf9f3;
  color:#176545;
  border-color:#b8e5cf;
}
html[data-theme="light"] .b-info,
html[data-theme="light"] .b-role{
  background:#eef5ff;
  color:#245899;
  border-color:#c5d9f3;
}
html[data-theme="light"] .b-warn{
  background:#fff8e8;
  color:#805d12;
  border-color:#ead79f;
}
html[data-theme="light"] .b-bad{
  background:#fff1f1;
  color:#9b3d3d;
  border-color:#edc0c0;
}
html[data-theme="light"] .b-neutral{
  background:#f4f6f9;
  color:#566274;
  border-color:#d4dbe5;
}
html[data-theme="light"] .notice.ok{
  background:#edf9f3 !important;
  color:#176545 !important;
  border-color:#b8e5cf !important;
}
html[data-theme="light"] .notice.info{
  background:#eef5ff !important;
  color:#245899 !important;
  border-color:#c5d9f3 !important;
}
html[data-theme="light"] .notice.warn{
  background:#fff8e8 !important;
  color:#805d12 !important;
  border-color:#ead79f !important;
}
html[data-theme="light"] .notice.err{
  background:#fff1f1 !important;
  color:#9b3d3d !important;
  border-color:#edc0c0 !important;
}
html[data-theme="light"] #modal{
  background:rgba(15,23,42,.42);
}
html[data-theme="light"] #modal .box,
html[data-theme="light"] #sheet,
html[data-theme="light"] dialog{
  background:#fff !important;
  color:#172033 !important;
  border-color:#dfe3ec !important;
  box-shadow:0 24px 70px rgba(15,23,42,.16) !important;
}
html[data-theme="light"] dialog::backdrop{
  background:rgba(15,23,42,.38);
}

html[data-theme="light"] .asset,
html[data-theme="light"] .item,
html[data-theme="light"] .stat,
html[data-theme="light"] .code,
html[data-theme="light"] code{
  background:#f8fafc !important;
  color:#172033;
  border-color:#dfe3ec !important;
}
html[data-theme="light"] .asset .state{
  color:#667386;
}
html[data-theme="light"] .asset.done .state{
  color:#19704d;
}
html[data-theme="light"] .security-list,
html[data-theme="light"] .license-note{
  color:#465367;
}
html[data-theme="light"] .progress{
  background:#e7ecf3;
  border-color:#d4dbe5;
}
html[data-theme="light"] .source{
  color:#245fb8;
}

html[data-theme="light"] .company,
html[data-theme="light"] .kb-row{
  background:#fff;
  border-color:#dfe3ec;
}
html[data-theme="light"] .company.current{
  box-shadow:inset 3px 0 0 rgba(58,147,255,.55);
}

html[data-theme="light"] body.sh-body{
  background:#f7f8fb !important;
  color:#172033 !important;
}
html[data-theme="light"] .sh-header{
  background:#fff !important;
  color:#172033 !important;
  border-color:#dfe3ec !important;
}
html[data-theme="light"] .sh-card{
  background:#fff !important;
  color:#172033 !important;
  border-color:#dfe3ec !important;
  box-shadow:0 6px 22px rgba(15,23,42,.045);
}
html[data-theme="light"] .sh-btn{
  background:#f8fafc !important;
  color:#172033 !important;
  border-color:#cfd6e2 !important;
}
html[data-theme="light"] .sh-btn:hover{
  background:#eef2f7 !important;
  border-color:#aeb9c8 !important;
}
html[data-theme="light"] .sh-btn.warn{
  background:#fff8e8 !important;
  color:#805d12 !important;
  border-color:#d9c27e !important;
}
html[data-theme="light"] .sh-muted,
html[data-theme="light"] .sh-metric .k{
  color:#5f6b7a !important;
}
html[data-theme="light"] .sh-tabs{
  border-color:#dfe3ec !important;
}
html[data-theme="light"] .sh-tabs a{
  color:#315d91 !important;
}
html[data-theme="light"] .sh-note{
  background:#f8fafc !important;
  color:#566274 !important;
  border-color:#d9e0e9 !important;
}
html[data-theme="light"] .sh-issue,
html[data-theme="light"] .sh-metric,
html[data-theme="light"] .sh-table th,
html[data-theme="light"] .sh-table td{
  border-color:#e2e7ef !important;
}
html[data-theme="light"] .sh-table{
  color:#172033 !important;
}
html[data-theme="light"] .sh-code-list,
html[data-theme="light"] .sh-hash{
  background:#f8fafc !important;
  color:#334155 !important;
  border-color:#dfe3ec !important;
}
html[data-theme="light"] .sh-banner.ok{
  background:#edf9f3 !important;
  color:#176545 !important;
  border-color:#b8e5cf !important;
}
html[data-theme="light"] .sh-banner.err{
  background:#fff1f1 !important;
  color:#9b3d3d !important;
  border-color:#edc0c0 !important;
}
html[data-theme="light"] .sh-status{
  background:#f4f6f9 !important;
  color:#445164 !important;
  border-color:#cfd6e2 !important;
}
html[data-theme="light"] .sh-status.healthy,
html[data-theme="light"] .sh-status.ok{
  background:#edf9f3 !important;
  color:#176545 !important;
  border-color:#b8e5cf !important;
}
html[data-theme="light"] .sh-status.notice,
html[data-theme="light"] .sh-status.info{
  background:#eef5ff !important;
  color:#245899 !important;
  border-color:#c5d9f3 !important;
}
html[data-theme="light"] .sh-status.warning,
html[data-theme="light"] .sh-status.warn{
  background:#fff8e8 !important;
  color:#805d12 !important;
  border-color:#ead79f !important;
}
html[data-theme="light"] .sh-status.bad,
html[data-theme="light"] .sh-status.error,
html[data-theme="light"] .sh-status.critical{
  background:#fff1f1 !important;
  color:#9b3d3d !important;
  border-color:#edc0c0 !important;
}

html[data-theme="light"] body.ct-invite-accept{
  background:#f7f8fb !important;
  color:#172033 !important;
}
html[data-theme="light"] .ct-invite-accept .card{
  background:#fff !important;
  color:#172033 !important;
  border-color:#dfe3ec !important;
  box-shadow:0 10px 30px rgba(15,23,42,.08);
}
html[data-theme="light"] .ct-invite-accept .muted{
  color:#5f6b7a !important;
}

html[data-theme="light"] .thumb .del{
  color:#5b1f1f;
}
html[data-theme="light"] .kb-modal__backdrop{
  background:rgba(15,23,42,.38);
}

/* KB manager: reduce the Light-mode glow on the New knowledge base button. */
html[data-theme="light"] .top-actions .btn.btn--primary{
  box-shadow:0 2px 6px rgba(15,23,42,.12) !important;
}
html[data-theme="light"] .top-actions .btn.btn--primary:hover:not(:disabled){
  box-shadow:0 3px 8px rgba(15,23,42,.15) !important;
}


/* Cross-page light-mode brand polish; dark surfaces handled separately. */
html[data-theme="light"] .ct-auth-card,
html[data-theme="light"] .kb-panel,
html[data-theme="light"] .kb-card{
  background:#ffffff;
  border-color:#d5dfe8;
}
