/* ESFX V75 — Dark Mode component-wide consistency layer.
   Deliberately dark-scoped: DOES NOT modify default Light theme.
   Applied AFTER theme-v72.css (which already contains V73/V74 corrections).
   No blanket recoloring of images, canvases, iframes or user banners. */

/* A brand-specific dark wordmark, not a white plate on a dark AppBar. */
.esfx-brand-dark{display:none!important}
html[data-esfx-theme="dark"] .site-header .brand.brand-logo-only{
  padding:0!important;min-height:0!important;background:transparent!important;
  border:0!important;border-radius:0!important;box-shadow:none!important;
}
html[data-esfx-theme="dark"] .site-header .brand.brand-logo-only img.esfx-brand-light,
html[data-esfx-theme="dark"] .esfx-native-menu-head img.esfx-brand-light{display:none!important}
html[data-esfx-theme="dark"] .site-header .brand.brand-logo-only img.esfx-brand-dark,
html[data-esfx-theme="dark"] .esfx-native-menu-head img.esfx-brand-dark{
  display:block!important;filter:none!important;mix-blend-mode:normal!important;
  object-fit:contain!important;
}
/* Custom logos are not forcibly inverted or replaced. */
html[data-esfx-theme="dark"] .site-header .brand.brand-logo-only img.esfx-brand-light:only-child,
html[data-esfx-theme="dark"] .esfx-native-menu-head img.esfx-brand-light:only-of-type{display:block!important}
html[data-esfx-theme="dark"] .esfx-native-menu-head{
  background:#26313a!important;color:#e7eef1!important;
  border-bottom:1px solid #42515b!important;
}
html[data-esfx-theme="dark"] .esfx-native-menu-head :is(small,strong){color:#afc3c9!important}
html[data-esfx-theme="dark"] .esfx-native-menu-head .icon-button[data-esfx-native-menu-close]{
  background:#31414b!important;border-color:#465965!important;color:#e1eff0!important;
}

/* Profile: V33 legacy card, stats and placeholder cover used fixed white fills. */
html[data-esfx-theme="dark"] .profile-hero-v33,
html[data-esfx-theme="dark"] .profile-hero,
html[data-esfx-theme="dark"] .profile-cover-edit-card{
  background:#26313a!important;border-color:#42515b!important;color:#eef4f5!important;
  box-shadow:none!important;
}
html[data-esfx-theme="dark"] .profile-hero-v33 :is(.profile-main h1,.profile-identity h1,.profile-title-row h1,.profile-stat strong){color:#edf4f5!important}
html[data-esfx-theme="dark"] .profile-hero-v33 :is(.profile-handle,.profile-stat small,.profile-meta-item,.profile-bio){color:#b6c6ce!important}
html[data-esfx-theme="dark"] .profile-hero-v33 .profile-stats{
  background:#2e3c46!important;border:1px solid #495963!important;
}
html[data-esfx-theme="dark"] .profile-hero-v33 .profile-stat + .profile-stat{border-left-color:#455762!important}
html[data-esfx-theme="dark"] .profile-hero-v33 .profile-stat-button:not(:disabled):hover{background:#394d55!important}
html[data-esfx-theme="dark"] .profile-hero-v33 .profile-avatar-pro{border-color:#26313a!important}
html[data-esfx-theme="dark"] .profile-hero-v33 .profile-cover:not(:has(img.profile-cover-image)){
  background:linear-gradient(125deg,#30444d 0%,#334c50 48%,#243b41 100%)!important;
  border-bottom-color:#40535e!important;
}
html[data-esfx-theme="dark"] .profile-hero-v33 .profile-cover:not(:has(img.profile-cover-image)):after{
  background:radial-gradient(circle at 18% 20%,rgba(34,197,94,.09),transparent 35%),
   radial-gradient(circle at 88% 10%,rgba(77,144,185,.08),transparent 32%)!important;
}
html[data-esfx-theme="dark"] .profile-cover-edit-preview,
html[data-esfx-theme="dark"] .profile-cover-edit-empty{
  background:linear-gradient(120deg,#2d424a,#293841)!important;
}
html[data-esfx-theme="dark"] .profile-cover-edit-empty span{color:#a8bbc4!important}
html[data-esfx-theme="dark"] .profile-cover-edit-card>.editor-help{color:#b6c6ce!important}
html[data-esfx-theme="dark"] :is(.profile-website-link,.profile-meta-item a,.profile-social-link){color:#b6dbeb!important}
html[data-esfx-theme="dark"] .profile-social-link{
  background:#31404b!important;border-color:#475964!important;
}
html[data-esfx-theme="dark"] .profile-social-link:hover{background:#3d4f5a!important}
html[data-esfx-theme="dark"] :is(.profile-cover-size-badge,.store-open-access-badge){
  background:#284d43!important;border-color:#41745d!important;color:#baf2d5!important;
}

/* Academy & Products: lesson side navigation, back button, local badges. */
html[data-esfx-theme="dark"] :is(.course-lesson-sidebar,.course-lesson-view,.course-v15-head,.course-locked-list,.course-price-box){
  background-color:#26313a!important;border-color:#43535e!important;color:#e7eef1!important;
}
html[data-esfx-theme="dark"] .course-lesson-sidebar nav a{
  background:transparent!important;border:1px solid transparent!important;color:#d0dfe3!important;
}
html[data-esfx-theme="dark"] .course-lesson-sidebar nav a:hover{
  background:#354651!important;color:#f4faf9!important;
}
html[data-esfx-theme="dark"] .course-lesson-sidebar nav a.active,
html[data-esfx-theme="dark"] .course-lesson-sidebar nav a.active:hover{
  background:#205f48!important;border-color:#35765d!important;color:#e8fff4!important;
}
html[data-esfx-theme="dark"] .course-lesson-sidebar nav a.done:not(.active){
  background:#29493f!important;color:#bdf0d4!important;border-color:#3a6654!important;
}
html[data-esfx-theme="dark"] .course-lesson-sidebar nav a :is(strong,small,span,i){color:inherit!important}
html[data-esfx-theme="dark"] .course-progress-top strong,
html[data-esfx-theme="dark"] .academy-progress-meta strong,
html[data-esfx-theme="dark"] .course-v15-head h1,
html[data-esfx-theme="dark"] .course-lesson-top h2{color:#f0f5f5!important}
html[data-esfx-theme="dark"] .course-text-content{color:#d1dee1!important}
html[data-esfx-theme="dark"] .course-head-meta span{
  background:#35434d!important;color:#c8d6da!important;
}
html[data-esfx-theme="dark"] .store-back,
html[data-esfx-theme="dark"] .news-back,
html[data-esfx-theme="dark"] .market-back-link,
html[data-esfx-theme="dark"] .chat-back{
  background:#254f42!important;color:#b4f1d0!important;border:1px solid #3e735e!important;
}
html[data-esfx-theme="dark"] .store-back:hover,
html[data-esfx-theme="dark"] .news-back:hover,
html[data-esfx-theme="dark"] .market-back-link:hover,
html[data-esfx-theme="dark"] .chat-back:hover{
  background:#2c654e!important;border-color:#599779!important;color:#edfff5!important;
}
html[data-esfx-theme="dark"] .academy-access-badge{background:#214d3b!important;color:#b3f1d0!important;border-color:#3e7055!important}
html[data-esfx-theme="dark"] :is(.course-lesson-top,.course-lesson-nav,.course-lesson-sidebar nav){border-color:#43535e!important}

/* Mobile web menu: old sticky locale footer was a bright white stripe. */
html[data-esfx-theme="dark"] .mobile-menu-language{
  position:sticky;background:#26313a!important;
  border-top:1px solid #44535e!important;
  color:#d8e3e6!important;
  box-shadow:0 -8px 20px rgba(17,26,33,.35)!important;
  z-index:3;
}
html[data-esfx-theme="dark"] .mobile-menu-language-label,
html[data-esfx-theme="dark"] .mobile-menu-language-label .ui-icon{
  color:#d2e0e4!important;
}
html[data-esfx-theme="dark"] .mobile-menu-language-options{
  background:#1e2a33!important;
  border:1px solid #43545e!important;
}
html[data-esfx-theme="dark"] .mobile-menu-language-options a,
html[data-esfx-theme="dark"] .esfx-native-menu-language a{
  background:transparent!important;color:#c0d0d6!important;
}
html[data-esfx-theme="dark"] .mobile-menu-language-options a:hover,
html[data-esfx-theme="dark"] .esfx-native-menu-language a:hover{
  background:#364c54!important;color:#f3faf8!important;
}
html[data-esfx-theme="dark"] .mobile-menu-language-options a.active,
html[data-esfx-theme="dark"] .esfx-native-menu-language a.active{
  background:#255a46!important;color:#c3f7dc!important;box-shadow:none!important;
}
html[data-esfx-theme="dark"] .esfx-native-menu-language{
  border-top:1px solid #44535e!important;background:#26313a!important;
}
html[data-esfx-theme="dark"] .mobile-menu.open{background:#26313a!important;border-color:#43535e!important}

/* Cross-page components discovered in the source audit. */
html[data-esfx-theme="dark"] :is(.profile-cover-edit-overlay,.ai-desk-history-list details,.admin-file-chip,
 .messenger-search,.messenger-search-empty,.profile-social-editor,.course-video-embed,
 .academy-progress,.news-source-clean a,.search-filter,
 .filter-bar,.course-lesson-sidebar,.calendar-filter-card){border-color:#43535e!important}
html[data-esfx-theme="dark"] :is(.messenger-search,.messenger-search-empty,.admin-file-chip,.profile-social-editor,
 .profile-cover-edit-overlay,.course-lesson-sidebar,.course-lesson-view){color:#d6e2e5!important}
html[data-esfx-theme="dark"] :is(.messenger-search,.messenger-search-empty,.profile-social-editor,
 .admin-file-chip,.ai-desk-history-list details){background-color:#293942!important}
html[data-esfx-theme="dark"] :is(.ai-desk-history-list summary,.profile-editor legend,.profile-editor label,
 .course-progress-top,.academy-progress-meta){color:#cbdade!important}

/* Small screens: preserve safe-area and avoid new menu/profile overflow. */
@media(max-width:860px){
 html[data-esfx-theme="dark"] .site-header .brand.brand-logo-only{display:none!important}
 html[data-esfx-theme="dark"] .mobile-menu-language{bottom:0}
 html[data-esfx-theme="dark"] .profile-hero-v33,
 html[data-esfx-theme="dark"] .profile-hero-v33 .profile-hero-body,
 html[data-esfx-theme="dark"] .course-lesson-sidebar{min-width:0;max-width:100%}
}

/* Audit extensions: remaining white UI islands in auth, search, media, admin and content.
   In particular, keep external OAuth branding and PDF/chart content unchanged. */
html[data-esfx-theme="dark"] :is(.auth-shell,.auth-card-box,.editor-card,.ai-side,.article-content,
 .policy-toc,.people-search-head,.people-search-results,.people-search-autocomplete,
 .notification-request,.notification-item button,.message-content,.chat-blocked-note,
 .chat-media-preview,.chat-media-sheet-card,.profile-avatar-edit-card,.ai-loading-card,
 .esfx-profile-photo-dialog,.admin-kpi,.admin-panel,.admin-control-card,
 .cron-job-card,.admin-login-card,.admin-create-drawer,.admin-inline-editor){
  background:#26313a!important;color:#e5eef0!important;
  border-color:#42515b!important;
}
html[data-esfx-theme="dark"] .support-hero,
html[data-esfx-theme="dark"] .auth-simple-page{
  background:linear-gradient(140deg,#22343d,#1c282f)!important;
  color:#e8f2f2!important;
}
html[data-esfx-theme="dark"] :is(.ai-review-preview,.people-search-suggestion-agent,
 .people-search-username b,.connections-tabs button.active,.notification-request.unread,
 .chat-media-sheet-actions button,.chat-media-sheet-cancel,
 .profile-username-input,.admin-action-grid a,.admin-secondary-btn,.admin-icon-btn){
  background:#30404b!important;color:#d9e7e9!important;border-color:#485a66!important;
}
html[data-esfx-theme="dark"] .notification-item.unread button,
html[data-esfx-theme="dark"] .notification-item button:hover,
html[data-esfx-theme="dark"] .admin-action-grid a:hover{
  background:#344650!important;color:#e9f5f6!important;
}
html[data-esfx-theme="dark"] .admin-v8-body,
html[data-esfx-theme="dark"] .admin-v8-body .admin-app{
  background:#182128!important;
}
html[data-esfx-theme="dark"] :is(.admin-table-wrap th,.admin-lang-compact,
 .admin-public-site-btn,.admin-prompt-grid textarea,.cron-copy-field input,
 .admin-v8-body input,.admin-v8-body select,.admin-v8-body textarea,
 .moderation-reject-box select,.moderation-reject-box input,
 .ai-admin-field input,.ai-admin-field select,.ai-prompt-field textarea){
  background:#303e48!important;color:#d6e5e8!important;border-color:#53646e!important;
}
html[data-esfx-theme="dark"] :is(.admin-lang-compact a,.admin-public-site-btn){
  color:#d6e5e8!important;
}
html[data-esfx-theme="dark"] :is(.admin-lang-compact a.active,
 .esfx-admin-nav-link.active,.admin-v8-side.esfx-admin-sidebar-v42 .admin-core-link.active){
  background:#215d47!important;color:#eafff2!important;
}
html[data-esfx-theme="dark"] .admin-v8-body .admin-public-site-btn:hover{
  background:#3b4c58!important;color:#f4f8f9!important;
}
html[data-esfx-theme="dark"] .admin-alert.error,
html[data-esfx-theme="dark"] .brand-admin-alert.error,
html[data-esfx-theme="dark"] .ai-admin-alert.error,
html[data-esfx-theme="dark"] .moderation-state-banner.rejected,
html[data-esfx-theme="dark"] .market-stale-alert{
  background:#543941!important;color:#ffd2d6!important;border-color:#85525e!important;
}
html[data-esfx-theme="dark"] .moderation-state-banner.pending,
html[data-esfx-theme="dark"] .admin-status.warn,
html[data-esfx-theme="dark"] .ai-limit-exhausted{
  background:#58462f!important;color:#ffe0a3!important;border-color:#816342!important;
}
html[data-esfx-theme="dark"] .esfx-dialog-btn-secondary{
  background:#34424e!important;color:#dfebed!important;border-color:#4a5c66!important;
}
html[data-esfx-theme="dark"] .esfx-dialog-btn-secondary:hover{
  background:#40525d!important;
}
html[data-esfx-theme="dark"] .chat-media-preview-remove,
html[data-esfx-theme="dark"] .chat-media-sheet-cancel{
  background:#354550!important;color:#e1ebed!important;border-color:#53636d!important;
}
/* Deliberately keep OAuth logos/buttons, PDF content surfaces and user media unmodified. */
html[data-esfx-theme="dark"] .agent-public-state.on{
  background:#255341!important;border-color:#427b5f!important;color:#bcf3d7!important;
}
