/* Dark-mode overrides loaded after CSS isolation so component styles cannot reset surfaces. */
html[data-theme="dark"] .content{color:#e4edf4;background:#0b1720}
html[data-theme="dark"] .content .page-heading :is(h1,h2,h3,p),
html[data-theme="dark"] .content .platform-heading :is(h1,h2,h3,p){color:#e6f0f5!important}
html[data-theme="dark"] .content :is(.platform-card,.platform-empty,.platform-state,.platform-tabs,.developer-tabs,.quick-access,.quick-card,.metric-card,.panel,.state-card,.dashboard-reservations,.dashboard-attention,.business-stepper article,.wizard-section,.store-entry-card,.developer-stats article,.developer-plan-card,.developer-accounts,.developer-audit,.developer-support-grid article){color:#e4edf4!important;background:#132936!important;border-color:#2b4656!important}
html[data-theme="dark"] .content :is(.platform-card,.platform-empty,.platform-state,.platform-tabs,.developer-tabs,.quick-access,.quick-card,.metric-card,.panel,.state-card,.dashboard-reservations,.dashboard-attention,.business-stepper article,.wizard-section,.store-entry-card,.developer-stats article,.developer-plan-card,.developer-accounts,.developer-audit,.developer-support-grid article) :is(h1,h2,h3,h4,h5,h6,strong,b,dt,th){color:#e6f0f5!important}
html[data-theme="dark"] .content :is(.platform-card,.platform-empty,.platform-state,.platform-tabs,.developer-tabs,.quick-access,.quick-card,.metric-card,.panel,.state-card,.dashboard-reservations,.dashboard-attention,.business-stepper article,.wizard-section,.store-entry-card,.developer-stats article,.developer-plan-card,.developer-accounts,.developer-audit,.developer-support-grid article) :is(p,small,label,dd,td,.developer-muted){color:#b9c9d2!important}
html[data-theme="dark"] .content :is(.business-summary-stats article,.business-next-steps li){color:#e4edf4!important;background:#172f3e!important;border-color:#365364!important}
html[data-theme="dark"] .content :is(.business-summary-stats article,.business-next-steps li) :is(strong,b){color:#e6f0f5!important}
html[data-theme="dark"] .content :is(.business-summary-stats article,.business-next-steps li) small{color:#b9c9d2!important}
html[data-theme="dark"] .content :is(.business-list-heading h2,.business-next-steps h3){color:#e6f0f5!important}
html[data-theme="dark"] .content .business-list-heading p{color:#b9c9d2!important}
html[data-theme="dark"] .content .business-summary-details{border-color:#2b4656!important}
html[data-theme="dark"] .content .business-summary-details :is(span,strong){color:#c8d7df!important}
html[data-theme="dark"] .content .business-next-steps{border-color:#2b4656!important}
html[data-theme="dark"] .content .business-access-note{color:#c8d7df!important;background:#203744!important}
html[data-theme="dark"] .content .business-editor-shell--open .business-wizard-close{color:#dce8ee!important;background:#203744!important;border-color:#365364!important}

/* Creation wizard: module cards are surfaces inside a larger editor surface. */
html[data-theme="dark"] .content .business-editor .store-module-picker label{color:#e4edf4!important;background:#172f3e!important;border-color:#365364!important;opacity:1}
html[data-theme="dark"] .content .business-editor .store-module-picker label :is(strong,small){color:#dce8ee!important}
html[data-theme="dark"] .content .business-editor .store-module-picker label.selected{background:#123d53!important;border-color:#38bdf8!important}
html[data-theme="dark"] .content .business-editor .store-module-picker label.disabled{background:#263640!important;border-color:#3c4d57!important}
html[data-theme="dark"] .content .business-editor .store-module-picker label.disabled :is(strong,small){color:#b9c6cc!important}
html[data-theme="dark"] .content .wizard-section.activation-required{background:#142f40!important;border-color:#31566b!important}
html[data-theme="dark"] .content .module-picker{color:#e4edf4!important;background:#132936!important;border-color:#2b4656!important}
html[data-theme="dark"] .content .module-picker__heading :is(h2,p){color:#e6f0f5!important}
html[data-theme="dark"] .content .module-option{color:#e4edf4!important;background:#172f3e!important;border-color:#365364!important}
html[data-theme="dark"] .content .module-option__copy :is(strong,small){color:#dce8ee!important}
html[data-theme="dark"] .content .module-option:has(input:checked){background:#123d53!important;border-color:#38bdf8!important}
html[data-theme="dark"] .content .module-option.disabled{background:#263640!important;border-color:#3c4d57!important}
html[data-theme="dark"] .content .module-option__state{color:#c5d5de!important;background:#203d4d!important}
html[data-theme="dark"] .content .module-option:has(input:checked) .module-option__state{color:#86efac!important;background:#173c37!important}
html[data-theme="dark"] .content .module-welcome{color:#dce8ee!important;background:#153646!important}

/* Dashboard surfaces and the preparation/status rows. */
html[data-theme="dark"] .content .quick-card:hover{background:#193747!important;border-color:#4a7187!important}
html[data-theme="dark"] .content .quick-card small,
html[data-theme="dark"] .content .metric-card :is(span,small){color:#b9c9d2!important}
html[data-theme="dark"] .content .family-row{border-color:#2a4352!important}
html[data-theme="dark"] .content .family-row__mark{color:#bfeaff!important;background:#203d4d!important}
html[data-theme="dark"] .content .readiness-item{border-color:#2a4352!important}
html[data-theme="dark"] .content .readiness-item>.oi{color:#b9c9d2!important;background:#203a49!important}
html[data-theme="dark"] .content .readiness-item.ok>.oi{color:#86efac!important;background:#173c37!important}
html[data-theme="dark"] .content .readiness-item.warn>.oi{color:#fcd34d!important;background:#44371e!important}
html[data-theme="dark"] .content .readiness-item :is(strong,small,a){color:#dce8ee!important}
html[data-theme="dark"] .content .dashboard-attention>a{color:#e4edf4!important;background:#1a303a!important;border-color:#574b2e!important}
html[data-theme="dark"] .content .dashboard-attention>a small{color:#c4b78f!important}
html[data-theme="dark"] .content .dashboard-reservation{color:#e4edf4!important;background:#172f3d!important;border-color:#2b4656!important}
html[data-theme="dark"] .content .dashboard-reservation__details small{color:#b9c9d2!important}
html[data-theme="dark"] .content .dashboard-reservations__count{color:#bfeaff!important;background:#203d4d!important}
html[data-theme="dark"] .content :is(.reservation-toolbar,.reservation-modal){color:#e4edf4!important;background:#132936!important;border-color:#2b4656!important}
html[data-theme="dark"] .content .reservation-modal__header :is(h2,p){color:#e4edf4!important}
html[data-theme="dark"] .content .reservation-modal :is(label,.reservation-form-hint){color:#c5d5de!important}
html[data-theme="dark"] .content .reservation-modal__close,html[data-theme="dark"] .content .reservation-modal__cancel{color:#dce8ee!important;background:#203744!important;border-color:#365364!important}
html[data-theme="dark"] .content .reservation-kind-switch{background:#203744!important}
html[data-theme="dark"] .content .reservation-kind-switch button:not(.active){color:#c5d5de!important}

/* Developer console. */
html[data-theme="dark"] .content .developer-tabs button:not(.active){color:#d1e0e8!important}
html[data-theme="dark"] .content .developer-tabs button:not(.active) span,
html[data-theme="dark"] .content .developer-plan-card footer span{color:#c5d5de!important;background:#203d4d!important}
html[data-theme="dark"] .content .developer-refresh{color:#bfeaff!important;background:#172f3e!important;border-color:#365364!important;text-decoration:none}

html[data-theme="dark"] .content :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea){color:#e4edf4!important;background:#102431!important;border-color:#395565!important}
html[data-theme="dark"] .content :is(input,select,textarea)::placeholder{color:#839aa7!important}
html[data-theme="dark"] .content table,html[data-theme="dark"] .content :is(th,td){border-color:#2a4352!important}
html[data-theme="dark"] .content :is(tr:nth-child(even),.list-row,.developer-list-head){background-color:#102431!important}
html[data-theme="dark"] .theme-toggle{color:#d8e9f2!important;background:#172d3b!important;border-color:#365364!important}

/* Final global pass: the web app has many page-specific wrappers with hard-coded light fills. */
html[data-theme="dark"] .content :is(div,article,section,aside,header,footer,nav,form,fieldset,table,tbody,thead,tfoot,tr,td,th){color:#dce7ed!important;background-color:#132936!important;border-color:#304b5a!important}
html[data-theme="dark"] .content label[class],html[data-theme="dark"] .content :is(a[class*="card"],a[class*="entry"]){color:#dce7ed!important;background-color:#132936!important;border-color:#304b5a!important}
html[data-theme="dark"] .content :is(h1,h2,h3,h4,h5,h6,p,span,strong,b,small,label,dt,dd,th,td,legend,summary,caption,time,a){color:#dce7ed!important}
html[data-theme="dark"] .content :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea){color:#e4edf4!important;background:#102431!important;border-color:#395565!important}
html[data-theme="dark"] .content :is(input,select,textarea)::placeholder{color:#91a8b4!important}
html[data-theme="dark"] .content :is([class*="icon"],.family-row__mark){color:#90ddff!important;background-color:#203d4d!important;border-color:#365364!important}
html[data-theme="dark"] .content :is([class*="pill"],[class*="badge"],[class*="status"]){color:#dce7ed!important;background-color:#273d49!important;border-color:#3b5665!important}
html[data-theme="dark"] .content :is(.green,.ok,.online,.success){color:#a7f3d0!important;background-color:#173c37!important;border-color:#286456!important}
html[data-theme="dark"] .content :is(.red,.error,.offline,.danger){color:#fecaca!important;background-color:#452528!important;border-color:#743d42!important}
html[data-theme="dark"] .content :is(.amber,.warning,.warn,.waiting){color:#fde68a!important;background-color:#44371e!important;border-color:#705a2c!important}
html[data-theme="dark"] .content .platform-primary,html[data-theme="dark"] .content .platform-save,html[data-theme="dark"] .content .primary-action{color:#fff!important;background:#0284c7!important}
html[data-theme="dark"] .content button:not(.platform-primary):not(.platform-save):not(.primary-action):not(.danger-small){color:#dce7ed!important;background-color:#203744!important;border-color:#3a5665!important}

/* Empty, loading and selection states are implemented by many isolated pages.
   Normalize them here so anchors/buttons don't retain a light surface in dark mode. */
html[data-theme="dark"] .content :is(.empty,.empty-state,.empty-categories,.empty-products,.empty-choice,.empty-specs,.employee-empty,.release-empty,.release-state,.apps-state,.catalog-state,.page-state,.editor-state,.loading-state,.device-empty,.routing-empty){
  color:#dce7ed!important;
  background-color:#132936!important;
  border-color:#365364!important;
}
html[data-theme="dark"] .content :is(.empty,.empty-state,.empty-categories,.empty-products,.empty-choice,.empty-specs,.employee-empty,.release-empty,.release-state,.apps-state,.catalog-state,.page-state,.editor-state,.loading-state,.device-empty,.routing-empty) :is(h1,h2,h3,h4,strong,b,span,small,p,a,label){color:#dce7ed!important}
html[data-theme="dark"] .content :is(.empty--button,.empty-state--button,.employee-empty,.empty-choice,.empty-specs){cursor:pointer}
html[data-theme="dark"] .content :is(.state--error,.page-state--error,.editor-state--error,.catalog-state--error){color:#fecaca!important;background-color:#452528!important;border-color:#743d42!important}
html[data-theme="dark"] .content :is(.state--error,.page-state--error,.editor-state--error,.catalog-state--error) :is(strong,span,p,a){color:#fecaca!important}

/* Restore the colour hierarchy: a dark theme should not turn every label white. */
html[data-theme="dark"] .content :is(h1,h2,h3,h4,h5,h6,strong,b,th,legend,summary){color:#f1f7fa!important}
html[data-theme="dark"] .content :is(p,small,dt,dd,time,caption,[class*="muted"],[class*="hint"],[class*="description"]){color:#a9c0cc!important}
html[data-theme="dark"] .content :is(.page-heading,.platform-heading) p{color:#a9c0cc!important}
html[data-theme="dark"] .content a:not(:is(.platform-primary,.platform-save,.primary-action,.empty)){color:#58c7ff!important}
html[data-theme="dark"] .content :is(.eyebrow,.section-label,.section-kicker,.platform-kicker,[class*="eyebrow"]){color:#55c9f5!important}
html[data-theme="dark"] .content :is(.oi,[class*="icon"]){color:#60cfff!important}
html[data-theme="dark"] .content :is(.price,.amount,.total,.rate-value,[class*="price"]){color:#55c9ff!important}
html[data-theme="dark"] .content :is(.green,.ok,.online,.success,.published,.status--ativo,.message--success){color:#6ee7b7!important}
html[data-theme="dark"] .content :is(.red,.error,.offline,.danger,.message--error){color:#fda4af!important}
html[data-theme="dark"] .content :is(.amber,.warning,.warn,.waiting,.status--pendente){color:#fcd34d!important}
html[data-theme="dark"] .content :is(.tabs,.developer-tabs,.platform-tabs) button.active{color:#e0f2fe!important;background:#075985!important;border-color:#38bdf8!important}
html[data-theme="dark"] .content :is(.empty,.empty-state,.empty-categories,.empty-products,.empty-choice,.empty-specs,.employee-empty,.release-empty,.release-state,.apps-state,.catalog-state,.page-state,.editor-state,.loading-state,.device-empty,.routing-empty) :is(.oi,[class*="icon"]){color:#55c9ff!important}
html[data-theme="dark"] .content :is(.empty,.empty-state,.empty-categories,.empty-products,.empty-choice,.empty-specs,.employee-empty,.release-empty,.release-state,.apps-state,.catalog-state,.page-state,.editor-state,.loading-state,.device-empty,.routing-empty) :is(strong,b){color:#f1f7fa!important}
html[data-theme="dark"] .content :is(.empty,.empty-state,.empty-categories,.empty-products,.empty-choice,.empty-specs,.employee-empty,.release-empty,.release-state,.apps-state,.catalog-state,.page-state,.editor-state,.loading-state,.device-empty,.routing-empty) :is(small,p){color:#a9c0cc!important}
html[data-theme="dark"] .top-row .notification-bell{color:#7dd3fc;background:#122b3a;border-color:#355366}
html[data-theme="dark"] .top-row .notification-panel{color:#e4f0f6;background:#102735;border-color:#355366}
html[data-theme="dark"] .top-row .notification-panel__header,html[data-theme="dark"] .top-row .notification-panel footer,html[data-theme="dark"] .top-row .notification-item{border-color:#294657}
html[data-theme="dark"] .top-row .notification-panel__header small,html[data-theme="dark"] .top-row .notification-empty{color:#a5bdca}
html[data-theme="dark"] .top-row .notification-item__body>span{color:#bbced8}

/* Version and backup/recovery panels. */
html[data-theme="dark"] .content :is(.installed-versions,.installed-version-list article,.backup-summary article,.backup-list-card){color:#e4edf4!important;background:#132936!important;border-color:#304b5a!important}
html[data-theme="dark"] .content :is(.installed-versions,.installed-version-list article,.backup-summary article,.backup-list-card) :is(h1,h2,h3,strong,b){color:#f1f7fa!important}
html[data-theme="dark"] .content :is(.installed-versions,.installed-version-list article,.backup-summary article,.backup-list-card) :is(p,small,span){color:#a9c0cc!important}
html[data-theme="dark"] .content .installed-version-state.update{color:#fcd34d!important;background:#44371e!important}
html[data-theme="dark"] .content .installed-version-state.current{color:#6ee7b7!important;background:#173c37!important}
html[data-theme="dark"] .content .installed-version-state.unknown{color:#c5d5de!important;background:#203d4d!important}
html[data-theme="dark"] .content .backup-safety-note{color:#c1d1d9!important;background:#102431!important;border-color:#395565!important}
html[data-theme="dark"] .content .backup-message.success{color:#6ee7b7!important;background:#173c37!important;border-color:#27614f!important}
html[data-theme="dark"] .content .backup-message.error{color:#fda4af!important;background:#452528!important;border-color:#743d42!important}
html[data-theme="dark"] .top-row .notification-item.is-unread,html[data-theme="dark"] .top-row .notification-item:hover{background:#173547}
html[data-theme="dark"] .top-row__tools{background:#102431;border-color:#304b5a}
html[data-theme="dark"] .top-row .store-switch{color:#9fe4ff;background:#163749;border-color:#365c70}
html[data-theme="dark"] .top-row .help-trigger{color:#d8e9f2;background:#172d3b;border-color:#365364}
html[data-theme="dark"] .top-row .logout-button{color:#fecaca;background:#3c2529;border-color:#694047}
html[data-theme="dark"] .top-row .logout-button:hover{color:#fff;background:#b91c1c;border-color:#b91c1c}
html[data-theme="dark"] .content .developer-operations-note{color:#b9c9d2;background:#132936;border-color:#2b4656}
html[data-theme="dark"] .content .developer-operation-card.needs-attention{background:#302a1c;border-color:#76602c}
html[data-theme="dark"] .content .developer-operation-card h3,html[data-theme="dark"] .content .developer-operations-heading h2,html[data-theme="dark"] .content .developer-operations-intro strong,html[data-theme="dark"] .content .developer-operations-note strong{color:#e6f0f5}
html[data-theme="dark"] .content .developer-operation-card p,html[data-theme="dark"] .content .developer-operations-heading p,html[data-theme="dark"] .content .developer-operations-intro p,html[data-theme="dark"] .content .developer-operations-refresh small{color:#b9c9d2}
