/* Existing dark palette is untouched; light mode uses warm stone surfaces. */
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;flex-shrink:0;padding:5px;border:1px solid var(--line-strong);border-radius:6px;background:var(--surface);color:var(--muted);cursor:pointer}
.theme-toggle:hover{color:var(--text);border-color:var(--accent)}
.theme-toggle svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.theme-toggle .theme-moon{display:none}
html[data-theme=light] .theme-toggle .theme-sun{display:none}
html[data-theme=light] .theme-toggle .theme-moon{display:block}
html[data-theme=light]{color-scheme:light;--bg:#eeede8;--surface:#f8f7f3;--line:#dcdad3;--line-strong:#c5c2ba;--text:#292c34;--muted:#646873;--accent:#7151ac;--light-hover:#e9e7e1;--light-selected:#e9e1f3;--light-purple:#654697}
html[data-theme=light] .sidebar{background:#e6e5df}
html[data-theme=light] :is(.workspace-topbar,.subbar){background:#f3f2ed}
html[data-theme=light] :is(.brand-trigger,.brand-overview,.calendar-days a){background:#f2f1ec}
html[data-theme=light] :is(.brand-menu,.user-dropdown,.deal-stage-menu>div){background:var(--surface);border-color:var(--line-strong);box-shadow:0 12px 36px #292c341c}
html[data-theme=light] :is(.brand-menu>a:hover,.brand-menu>a.selected,.user-dropdown a:hover,.user-dropdown button:hover,.main-nav a:hover,.quiet-button:hover,.icon-button:hover,.brand-overview:hover,.calendar-days a:hover,.feature-list label:hover,.deal-stage-menu summary:hover,.board-pagination a:hover){background:var(--light-hover);color:var(--text)}
html[data-theme=light] :is(.main-nav a,.nav-section-label,.subbar-status,.app-footer,.metric-label,.metric-label .ui-icon,.overview-metrics article>small,.agenda-icon,.compact-deal .deal-customer,.deal-owner,.deal-amount-line small,.deal-stage-menu summary,.deal-stage-menu label){color:var(--muted)}
html[data-theme=light] :is(.sidebar-footer strong,.topbar-location strong,.insight-row strong,.pipeline-value,.form-field>label,.field-label){color:var(--text)}
html[data-theme=light] .location-divider{color:var(--muted)}
html[data-theme=light] :is(.main-nav a.active,.report-period .active,.calendar-days a.selected,.feature-list label.selected){background:var(--light-selected);color:var(--light-purple);border-color:#c2b2d6}
html[data-theme=light] :is(.subnav a.active,.brand-gate-card>span:last-child,.feature-tabs button.active,.feature-price,.offer-total-bar .grand-total strong,.pricing-guide b,.compact-deal h3 a:hover,.login-brand h1 span){color:var(--light-purple)}
html[data-theme=light] :is(.brand-symbol,.avatar){background:#e6def0;color:#654697;border-color:#cdbedd}
html[data-theme=light] .symbol-screenled{background:#d8e9de;color:#296447}
html[data-theme=light] .symbol-saltrino{background:#f0e0ce;color:#875222}
html[data-theme=light] .symbol-subterio{background:#dce7ee;color:#356580}
html[data-theme=light] .symbol-liftcontainer{background:#e6def0;color:#654697}
html[data-theme=light] :is(.quiet-button,.icon-button,.preview-toolbar button){background:#eeede7;color:var(--text)}
html[data-theme=light] :is(.primary-button,.login-card .primary){background:#7655ab;border-color:#7655ab;color:#faf7ff}
html[data-theme=light] :is(.primary-button:hover,.login-card .primary:hover){background:#644494;border-color:#644494}
html[data-theme=light] :is(.pipeline-track,.production-track){background:#e0ddd6}
html[data-theme=light] .pipeline-row{border-color:var(--line)}
html[data-theme=light] .report-source progress::-webkit-progress-bar{background:#e0ddd6}
html[data-theme=light] :is(th,.pricing-columns){background:#eeece6}
html[data-theme=light] :is(tbody tr:hover,.pricing-row:hover){background:#f0eee8}
html[data-theme=light] :is(.tag,.brand-pill){background:#ece9e3;color:#565967;border-color:#d4d0c7}
html[data-theme=light] .tag-amber{background:#f1e7d1;color:#815916;border-color:#decdab}
html[data-theme=light] :is(.tag-green,.tag-teal){background:#e0ece1;color:#326448;border-color:#c1d6c5}
html[data-theme=light] .pill-screenled{color:#2b6746}
html[data-theme=light] .pill-saltrino{color:#885526}
html[data-theme=light] .pill-subterio{color:#316887}
html[data-theme=light] .pill-liftcontainer{color:#684895}
html[data-theme=light] :is(input,select,textarea){background:#fcfbf7;color:var(--text)}
html[data-theme=light] :is(input,select,textarea):hover{border-color:#aaa69e}
html[data-theme=light] :is(input,textarea)::placeholder{color:#767983}
html[data-theme=light] select option{background:#f8f7f3;color:var(--text)}
html[data-theme=light] :is(.board-column,.compact-board .board-column){background:#e7e5df}
html[data-theme=light] :is(.deal-card,.compact-deal){background:var(--surface);border-color:var(--line-strong)}
html[data-theme=light] .board-cards{scrollbar-color:#b9b3c2 transparent}
html[data-theme=light] .compact-board .drop-target{background:#e8dff1;border-color:#9274b9;box-shadow:inset 0 0 0 1px #9274b9}
html[data-theme=light] :is(.errorlist,.error,.pricing-remove){color:#a33f52}
html[data-theme=light] .pricing-remove:hover{color:#822538}
html[data-theme=light] .notice{background:#eae3f0;border-color:#cbbbdc;color:#514163}
html[data-theme=light] .offer-steps span{color:var(--light-purple);border-color:#c5b7d3}
html[data-theme=light] :is(.product-summary,.pricing-guide){background:#f0eee8}
html[data-theme=light] .feature-check{border-color:#b5a7c6;color:var(--light-purple)}
html[data-theme=light] .feature-list input:not(:checked)+.feature-check{color:transparent}
html[data-theme=light] .feature-list input:checked+.feature-check{background:#7655ab;color:#faf7ff}
html[data-theme=light] .offer-total-bar{background:#eae4ef;border-color:#cfbfdc}
html[data-theme=light] .document-stage{background:#dedcd5}
html[data-theme=light] .pricing-row input[readonly]{background:#eae4ef;color:#654697}
html[data-theme=light] .pricing-save{background:#f8f7f3f5}
html[data-theme=light] .login-card{background:var(--surface)}
/* Production stylesheet is loaded by its view; root specificity wins there too. */
html[data-theme=light] .production-tabs button.selected{background:var(--light-selected);color:var(--light-purple);border-color:#cdbddd}
html[data-theme=light] .production-tabs b{background:#e5e2db;color:#63616a}
html[data-theme=light] .production-tabs .selected b{background:#dacde8;color:#624589}
html[data-theme=light] .production-search{background:var(--surface)}
html[data-theme=light] .production-search input{background:transparent}
html[data-theme=light] :is(.production-search .ui-icon,.production-table th button,.production-sort,.production-name small,.production-progress small,.production-help){color:var(--muted)}
html[data-theme=light] :is(.production-table th[aria-sort=ascending] button,.production-table th[aria-sort=descending] button,.production-help [role=status]){color:var(--light-purple)}
html[data-theme=light] .production-table-scroll{scrollbar-color:#b9b3c2 transparent}
html[data-theme=light] .production-table th{background:#eeece6;border-color:var(--line-strong)}
html[data-theme=light] .production-table td{background:var(--surface);border-color:var(--line)}
html[data-theme=light] .production-table tr:hover td{background:#f0eee8}
html[data-theme=light] :is(.production-table td:first-child,.production-table th:first-child){box-shadow:1px 0 var(--line)}
html[data-theme=light] .production-badge{background:#e9e6df;color:#5c5f69}
html[data-theme=light] .production-badge.active{background:#dbe9ee;color:#356677}
html[data-theme=light] .production-badge.ready{background:#dfecdf;color:#386948}
html[data-theme=light] :is(.production-stage,.production-date){color:#4f535e}
html[data-theme=light] .production-table :is(input,select){background:#fcfbf7;color:var(--text);border-color:var(--line-strong)}
html[data-theme=light] .production-table :is(input,select):focus{border-color:var(--accent)}
html[data-theme=light] .production-table .unsaved{border-color:#a77629}
html[data-theme=light] .production-retry{color:#8b601f}
html[data-theme=light] :is(.app-brand img,.login-brand img){filter:brightness(.3)}
