/* Theme is applied before first paint and shared across the home and workspace. */
.account-profile{gap:9px}.theme-toggle{flex-shrink:0;display:grid;place-items:center;width:34px;height:34px;padding:0;border:1px solid #c3ca9240;border-radius:10px;background:#c3ca9210;color:#e2e8c8;font:22px/1 'Segoe UI',sans-serif;cursor:pointer}.theme-toggle:hover{background:#c3ca9228}.theme-toggle:focus-visible{outline:2px solid #e66277;outline-offset:3px}.account-logout{margin-left:0;padding:9px}.account-name{margin-right:auto}
html[data-theme="dark"]{color-scheme:dark;--bg:#17191d;--surface:#22252b;--surface-soft:#2a2e35;--ink:#eeeef2;--muted:#b0b3be;--line:#393e48;--accent:#e66277;--action-accent:#e66277;--action-accent-hover:#ef7c8e;background:#17191d}
html[data-theme="dark"] body{background:radial-gradient(ellipse at 85% 0%,#e662770a,transparent 55%),#17191d!important;color:#eeeef2}
html[data-theme="dark"] body>aside{background:#1f2228!important;box-shadow:8px 0 30px #0004!important}
html[data-theme="dark"] :is(h1,h2,h3,h4,p,label,td,th,dt,dd,summary,footer,.label,.metric,.source,.eyebrow,.overview-search-field>span,.subtle,.hint,.empty,.revision-bar,.application-nav-group h2,.application-group-toggle){color:#e5e6ec!important}
html[data-theme="dark"] :is(.hint,.subtle,.eyebrow,.revision-bar,.overview-list-meta,.workspace,.login-subtitle,footer){color:#aeb2bf!important}
html[data-theme="dark"] :is(.card,.overview-toolbar,.table-wrap,dialog,.tmc-group>summary,.design-object-breakdown,.risk-register,.risk-entry,.risk-group,.risk-overview-item,.economics-costs,.economics-prices,.upload-panel,.upload-saved-job,.source-text){background:#22252b!important;border-color:#393e48!important;box-shadow:none!important}
html[data-theme="dark"] :is(.economics-total,.upload-file-zone,.upload-steps,.application-tender-facts,.design-object-breakdown>summary,.risk-register>summary,.risk-entry>summary,.risk-controls,.design-line-sources,.upload-heading-icon,.upload-job-icon,.upload-steps b,th){background:#2a2e35!important;border-color:#424752!important;color:#e5e6ec!important}
html[data-theme="dark"] :is(input,select,textarea){background:#191c22!important;color:#eeeef2!important;border-color:#454b58!important;accent-color:#e66277!important}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#969ca9!important}
html[data-theme="dark"] :is(input,select,textarea):focus{border-color:#e66277!important;box-shadow:0 0 0 3px #e6627720!important}
html[data-theme="dark"] :is(.button,button.action,.account-logout,.theme-toggle){background:#2b3039!important;color:#ececf1!important;border-color:#454b58!important;box-shadow:none!important}
html[data-theme="dark"] :is(.button,button.action,.account-logout,.theme-toggle):hover{background:#373c47!important;border-color:#e6627780!important}
html[data-theme="dark"] :is(.primary,button[data-human-decision="CONFIRM"],button[data-design-confirm],.badge.work-priced-badge){background:#e66277!important;color:#17191d!important;border-color:#e66277!important;box-shadow:0 4px 15px #e6627712!important}
html[data-theme="dark"] :is(.primary,button[data-human-decision="CONFIRM"],button[data-design-confirm]):hover{background:#ef7c8e!important;border-color:#ef7c8e!important}
html[data-theme="dark"] :is(td,th,.revision-bar,footer,.aside-foot,.workspace,.economics-cost-row,.design-object-total){border-color:#393e48!important}
html[data-theme="dark"] tbody tr:hover{background:#2b3039!important}
html[data-theme="dark"] aside :is(.brand-wordmark,.brand-wordmark span,.workspace,.account-name,.account-avatar){color:#eeeef2!important}
html[data-theme="dark"] aside #nav button{color:#c5c8d1!important}
html[data-theme="dark"] :is(aside #nav button.active,#tender-navigation nav button.active){background:#e662771c!important;border-color:#e6627760!important;color:#ffa5b3!important;box-shadow:inset 3px 0 #e66277!important}
html[data-theme="dark"] :is(aside #nav button:hover,#tender-navigation nav button:hover){background:#303540!important}
html[data-theme="dark"] #tender-navigation nav button{color:#c5c8d1!important}
html[data-theme="dark"] .sidebar-toggle{background:#262a32!important;border-color:#454b58!important;box-shadow:0 5px 20px #0004!important}
html[data-theme="dark"] .sidebar-backdrop,html[data-theme="dark"] dialog::backdrop{background:#07090db3!important}
html[data-theme="dark"] .account-avatar{background:#e6627718;border-color:#e6627740}
html[data-theme="dark"] :is(.badge,.CONFIRMED,.COMPLETE){background:#304238;color:#c7e3ce}
html[data-theme="dark"] :is(.CANDIDATE,.notice){background:#40372a!important;color:#f1d79e!important;border-color:#635239!important}
html[data-theme="dark"] :is(.AMBIGUOUS,.INCOMPLETE_RATE){background:#383149!important;color:#dfc9f4!important}
html[data-theme="dark"] :is(.NO_RATE,.error,.application-load-error){background:#452c34!important;color:#ffc0cc!important;border-color:#754452!important}
html[data-theme="dark"] :is(.notice,.error,.application-load-error) p{color:inherit!important}
html[data-theme="dark"] :is(a,button):focus-visible{outline-color:#e66277!important}
html[data-theme="dark"] .theme-toggle[aria-pressed="true"]{color:#ffa5b3!important;border-color:#e6627770!important}
html[data-theme="dark"] .title-letter{background:none;color:#eeeef2}
html[data-theme="dark"] .welcome-logo img{filter:drop-shadow(0 0 14px #e6627730);animation:coral-mark 6s ease-in-out infinite}
html[data-theme="dark"] .welcome-logo:before{background:radial-gradient(ellipse,#e662771c,transparent 72%)}
html[data-theme="dark"] .hero h1{animation:coral-title 6s ease-in-out infinite}
@keyframes coral-mark{0%,100%{transform:scale(1);filter:drop-shadow(0 0 5px #e6627718)}50%{transform:scale(1.025);filter:drop-shadow(0 0 18px #e6627755)}}
@keyframes coral-title{50%{filter:drop-shadow(0 0 7px #e6627770)}}
@media(prefers-reduced-motion:reduce){html[data-theme="dark"] .welcome-logo img,html[data-theme="dark"] .hero h1{animation:none!important}}

html[data-theme="dark"] main a:not(.button):not(.primary){color:#e8b4be!important}
html[data-theme="dark"] :is(.risk-attention,.risk-missing,.risk-priority-tag,.economics-total,.pending-calculation-notice){background:#2a2e35!important;color:#e5e6ec!important;border-color:#424752!important}
html[data-theme="dark"] .overview-results .COMPLETE{background:#304238!important;color:#c7e3ce!important}

/* Risk register: no light-theme surfaces or dividers in dark mode. */
html[data-theme="dark"] .tender-risks .risk-stat{background:#22252b!important;border-color:#393e48!important;color:#e5e6ec!important}
html[data-theme="dark"] .tender-risks .risk-stat-high{background:#32272d!important;border-color:#61404b!important;border-left-color:#df8276!important}
html[data-theme="dark"] .tender-risks .risk-stat-important{background:#282d29!important;border-left-color:#859864!important}
html[data-theme="dark"] .tender-risks :is(.risk-count,.risk-index){background:#343943!important;color:#e5e6ec!important}
html[data-theme="dark"] .tender-risks .risk-section>summary{border-color:#393e48!important}
html[data-theme="dark"] .tender-risks .risk-chevron{border-color:#aeb2bf!important}
html[data-theme="dark"] .tender-risks .risk-priority-high{border-left-color:#df8276!important}
html[data-theme="dark"] .tender-risks .risk-priority-important{border-left-color:#859864!important}
html[data-theme="dark"] .tender-risks .risk-priority-high .risk-priority-tag{background:#493039!important;color:#ffc0cc!important;border-color:#61404b!important}
html[data-theme="dark"] .tender-risks .risk-priority-important .risk-priority-tag{background:#40372a!important;color:#f1d79e!important;border-color:#635239!important}
html[data-theme="dark"] .tender-risks summary:focus-visible{outline-color:#e66277!important}
