/* Phase 18.9.5.28.5.8.9.50.6 — Dark Mode Elite UI Audit Fix
   Real final pass after reviewing Marketak-Pro-198.zip: popups, share modal, product detail,
   header menus, plans, win/referral page and vendor storefront. Loaded again at the end of body. */
html[data-marketak-theme="dark"]{color-scheme:dark;--dm506-bg:#06101d;--dm506-surface:#0b1628;--dm506-surface2:#111c31;--dm506-surface3:#17233a;--dm506-border:rgba(148,163,184,.28);--dm506-border2:rgba(96,165,250,.44);--dm506-text:#f8fbff;--dm506-title:#ffffff;--dm506-muted:#cbd5e1;--dm506-soft:#9fb2ca;--dm506-blue:#60a5fa;--dm506-cyan:#67e8f9;--dm506-violet:#8b5cf6;--dm506-green:#86efac;--dm506-gold:#fde68a;}
html[data-marketak-theme="dark"] body{background:var(--dm506-bg)!important;color:var(--dm506-text)!important;}
html[data-marketak-theme="dark"] body :where(h1,h2,h3,h4,h5,h6){color:var(--dm506-title)!important;opacity:1!important;text-shadow:none!important;}
html[data-marketak-theme="dark"] body :where(p,small,span,li,td,th,label,em){opacity:1!important;text-shadow:none!important;}

/* icon only theme switch — no visible text */
.marketak-theme-toggle{width:42px!important;min-width:42px!important;max-width:42px!important;height:42px!important;padding:0!important;overflow:hidden!important;display:inline-grid!important;place-items:center!important;font-size:0!important;gap:0!important;white-space:nowrap!important;}
.marketak-theme-toggle .theme-label,.marketak-theme-toggle [data-theme-label],.marketak-theme-toggle span:not([data-theme-icon]){display:none!important;width:0!important;height:0!important;overflow:hidden!important;opacity:0!important;visibility:hidden!important;}
.marketak-theme-toggle [data-theme-icon]{display:grid!important;place-items:center!important;font-size:18px!important;line-height:1!important;width:100%!important;height:100%!important;margin:0!important;}
html[data-marketak-theme="dark"] .marketak-theme-toggle{background:rgba(15,23,42,.92)!important;border:1px solid rgba(148,163,184,.32)!important;color:#fff!important;box-shadow:0 12px 30px rgba(0,0,0,.28)!important;}

/* Announcement ticker: readable dark not faded yellow */
html[data-marketak-theme="dark"] .marketak-announcement-ticker-v189515{--ann-bg-start:#1e293b!important;--ann-bg-end:#334155!important;--ann-text:#f8fafc!important;--ann-accent:#fde68a!important;background:linear-gradient(90deg,rgba(15,23,42,.96),rgba(51,65,85,.96))!important;border-color:rgba(148,163,184,.28)!important;color:#fff!important;box-shadow:0 18px 50px rgba(0,0,0,.28)!important;}
html[data-marketak-theme="dark"] .marketak-announcement-ticker-v189515 *{color:#fff!important;opacity:1!important;text-shadow:none!important;}
html[data-marketak-theme="dark"] .marketak-announcement-ticker-v189515 .ann-badge,html[data-marketak-theme="dark"] .marketak-announcement-ticker-v189515 .ann-close{background:#f8fafc!important;color:#0f172a!important;}

/* Exact smart popup classes defined inline in layout.php */
html[data-marketak-theme="dark"] .marketak-smart-popup-v1895231,html[data-marketak-theme="dark"] .marketak-smart-popup-v1895182{background:rgba(2,8,23,.72)!important;backdrop-filter:blur(18px)!important;}
html[data-marketak-theme="dark"] .marketak-smart-popup-v1895231 .smart-popup-card,html[data-marketak-theme="dark"] .marketak-smart-popup-v1895182 .smart-popup-card{background:linear-gradient(145deg,#0b1628 0%,#111c31 62%,#0b1628 100%)!important;border:1px solid rgba(125,211,252,.32)!important;color:#f8fbff!important;box-shadow:0 36px 120px rgba(0,0,0,.70)!important;}
html[data-marketak-theme="dark"] .marketak-smart-popup-v1895231 .smart-popup-body,html[data-marketak-theme="dark"] .marketak-smart-popup-v1895182 .smart-popup-body{background:linear-gradient(180deg,#0b1628,#101b2f)!important;color:#f8fbff!important;}
html[data-marketak-theme="dark"] .marketak-smart-popup-v1895231 h3,html[data-marketak-theme="dark"] .marketak-smart-popup-v1895182 h3{color:#fff!important;opacity:1!important;text-shadow:none!important;}
html[data-marketak-theme="dark"] .marketak-smart-popup-v1895231 p,html[data-marketak-theme="dark"] .marketak-smart-popup-v1895182 p{color:#dbeafe!important;opacity:1!important;text-shadow:none!important;}
html[data-marketak-theme="dark"] .marketak-smart-popup-v1895231 .smart-popup-close,html[data-marketak-theme="dark"] .marketak-smart-popup-v1895182 .smart-popup-close{background:#f8fafc!important;color:#0f172a!important;box-shadow:0 10px 30px rgba(0,0,0,.25)!important;}
html[data-marketak-theme="dark"] .marketak-smart-popup-v1895231 .smart-popup-actions button,html[data-marketak-theme="dark"] .marketak-smart-popup-v1895182 .smart-popup-actions button{background:#0f1b2f!important;color:#f8fbff!important;border:1px solid rgba(148,163,184,.34)!important;}
html[data-marketak-theme="dark"] .marketak-smart-popup-v1895231 .smart-popup-actions a,html[data-marketak-theme="dark"] .marketak-smart-popup-v1895182 .smart-popup-actions a{background:linear-gradient(135deg,#10b981,#22c55e)!important;color:#fff!important;}
html[data-marketak-theme="dark"] .marketak-smart-popup-v1895231 .smart-popup-meta,html[data-marketak-theme="dark"] .marketak-smart-popup-v1895182 .smart-popup-meta{background:rgba(14,165,233,.16)!important;color:#a5f3fc!important;border-color:rgba(125,211,252,.45)!important;}

/* Header dropdown / category mega menu — actual visible dropdown */
html[data-marketak-theme="dark"] :where(.mini-menu,.user-menu,.smart-search-results-v65,.mega-menu-v30,.nav-mega,.category-mega,.category-dropdown,.header-dropdown,.dropdown-menu){background:rgba(11,22,40,.98)!important;border:1px solid rgba(96,165,250,.35)!important;box-shadow:0 30px 90px rgba(0,0,0,.58)!important;backdrop-filter:blur(18px)!important;color:#fff!important;}
html[data-marketak-theme="dark"] :where(.mini-menu,.user-menu,.smart-search-results-v65,.mega-menu-v30,.nav-mega,.category-mega,.category-dropdown,.header-dropdown,.dropdown-menu) :where(a,button,span,b,strong,p,small,div){color:#eaf6ff!important;opacity:1!important;text-shadow:none!important;}
html[data-marketak-theme="dark"] :where(.mini-menu,.user-menu,.smart-search-results-v65,.mega-menu-v30,.nav-mega,.category-mega,.category-dropdown,.header-dropdown,.dropdown-menu) :where(a,button){background:rgba(15,23,42,.72)!important;border-color:rgba(148,163,184,.24)!important;}
html[data-marketak-theme="dark"] :where(.mini-menu,.user-menu,.smart-search-results-v65,.mega-menu-v30,.nav-mega,.category-mega,.category-dropdown,.header-dropdown,.dropdown-menu) :where(a:hover,button:hover){background:linear-gradient(135deg,#2563eb,#7c3aed)!important;color:#fff!important;}

/* Product detail page exact selectors */
html[data-marketak-theme="dark"] .product-super-page,html[data-marketak-theme="dark"] .product-v23{background:#06101d!important;color:#f8fbff!important;}
html[data-marketak-theme="dark"] .product-v23 :where(.product-buy-panel,.info-panel,.product-long-description,.reviews-card,.review-form-v23,.review-card-v23,.product-variant-picker-v185,.add-cart-box,.order-card-pro,.product-details-card,.product-specs-table-v28,.product-content-grid>*,.product-recommendations,.related-products,.product-side-card){background:linear-gradient(145deg,#0b1628,#111c31)!important;border:1px solid rgba(148,163,184,.28)!important;color:#f8fbff!important;box-shadow:0 28px 90px rgba(0,0,0,.34)!important;}
html[data-marketak-theme="dark"] .product-v23 :where(.product-buy-panel,.info-panel,.product-long-description,.reviews-card,.review-form-v23,.review-card-v23,.product-variant-picker-v185,.add-cart-box,.order-card-pro,.product-details-card,.product-specs-table-v28,.product-content-grid>*) :where(h1,h2,h3,h4,b,strong,label){color:#ffffff!important;opacity:1!important;}
html[data-marketak-theme="dark"] .product-v23 :where(.product-buy-panel,.info-panel,.product-long-description,.reviews-card,.review-form-v23,.review-card-v23,.product-variant-picker-v185,.add-cart-box,.order-card-pro,.product-details-card,.product-specs-table-v28,.product-content-grid>*) :where(p,span,small,li,td,th,em){color:#cbd5e1!important;opacity:1!important;}
html[data-marketak-theme="dark"] .product-v23 .product-buy-panel>h1,html[data-marketak-theme="dark"] .product-v23 .product-buy-panel .product-short{color:#fff!important;}
html[data-marketak-theme="dark"] .product-v23 :where(.product-price-line,.product-stock-pro-v57,.product-return-policy-card-v118,.product-digital-policy-card-v189541,.product-deposit-badge-v18953,.store-pill-pro,.option-group-v28,.variant-axis-group-v185,.variant-global-note-v185,.variant-compatible-head-v185,.digital-product-direct-accept-v189541){background:rgba(15,23,42,.84)!important;border:1px solid rgba(148,163,184,.30)!important;color:#f8fbff!important;box-shadow:none!important;}
html[data-marketak-theme="dark"] .product-v23 :where(.product-price-line,.product-stock-pro-v57,.product-return-policy-card-v118,.product-digital-policy-card-v189541,.product-deposit-badge-v18953,.store-pill-pro,.option-group-v28,.variant-axis-group-v185,.variant-global-note-v185,.variant-compatible-head-v185,.digital-product-direct-accept-v189541) *{color:#eaf6ff!important;opacity:1!important;}
html[data-marketak-theme="dark"] .product-v23 .product-price-line .price,html[data-marketak-theme="dark"] .product-v23 .product-price-line b.price{color:#7dd3fc!important;text-shadow:0 0 22px rgba(125,211,252,.24)!important;}
html[data-marketak-theme="dark"] .product-v23 .product-offer-strip-v61{background:linear-gradient(135deg,rgba(251,191,36,.16),rgba(249,115,22,.12))!important;border:1px solid rgba(251,191,36,.38)!important;color:#fde68a!important;}
html[data-marketak-theme="dark"] .product-v23 .product-offer-strip-v61 *{color:#fde68a!important;}
html[data-marketak-theme="dark"] .product-v23 :where(input,select,textarea){background:#0a1324!important;color:#f8fbff!important;border-color:rgba(148,163,184,.35)!important;}
html[data-marketak-theme="dark"] .product-v23 :where(input::placeholder,textarea::placeholder){color:#a8bad0!important;}
html[data-marketak-theme="dark"] .product-v23 .main-media-box,html[data-marketak-theme="dark"] .product-v23 .gallery-stage,html[data-marketak-theme="dark"] .product-v23 .media-stage-v23{background:#f8fafc!important;color:#0f172a!important;}
html[data-marketak-theme="dark"] .product-v23 .product-specs-table-v28 :where(th,td){background:#0f1b2f!important;border-color:rgba(148,163,184,.24)!important;color:#eaf6ff!important;}

/* Product share modal exact selectors */
html[data-marketak-theme="dark"] .product-share-center-v58 .share-center-backdrop-v58{background:rgba(2,8,23,.74)!important;backdrop-filter:blur(18px)!important;}
html[data-marketak-theme="dark"] .product-share-center-v58 .share-center-card-v58{background:linear-gradient(145deg,#0b1628,#111c31)!important;border:1px solid rgba(125,211,252,.34)!important;color:#f8fbff!important;box-shadow:0 36px 120px rgba(0,0,0,.72)!important;}
html[data-marketak-theme="dark"] .product-share-center-v58 :where(h1,h2,h3,b,strong,label){color:#fff!important;opacity:1!important;}
html[data-marketak-theme="dark"] .product-share-center-v58 :where(p,span,small){color:#cbd5e1!important;opacity:1!important;}
html[data-marketak-theme="dark"] .product-share-center-v58 :where(.share-action-v58,.share-copy-row-v58 input,.share-copy-row-v58 button,.share-product-preview-v58){background:#0a1324!important;border:1px solid rgba(148,163,184,.32)!important;color:#eaf6ff!important;}
html[data-marketak-theme="dark"] .product-share-center-v58 .share-action-v58:hover{background:linear-gradient(135deg,#2563eb,#7c3aed)!important;color:#fff!important;}
html[data-marketak-theme="dark"] .product-share-center-v58 .share-center-close-v58{background:#f8fafc!important;color:#0f172a!important;}

/* Product cards in sliders and grids: keep cards readable; no white text on white cards */
html[data-marketak-theme="dark"] .product-card-pro{background:#0f1b2f!important;border:1px solid rgba(96,165,250,.42)!important;color:#f8fbff!important;box-shadow:0 24px 70px rgba(0,0,0,.42)!important;}
html[data-marketak-theme="dark"] .product-card-pro .card-body{background:transparent!important;color:#f8fbff!important;}
html[data-marketak-theme="dark"] .product-card-pro :where(h3,h3 a,.price,b,strong){color:#ffffff!important;opacity:1!important;}
html[data-marketak-theme="dark"] .product-card-pro :where(p,.muted,.product-meta,.product-meta a,small,span,del){color:#cbd5e1!important;opacity:1!important;}
html[data-marketak-theme="dark"] .product-card-pro .price-row{background:rgba(248,250,252,.96)!important;border:1px solid rgba(226,232,240,.85)!important;color:#0f172a!important;}
html[data-marketak-theme="dark"] .product-card-pro .price-row :where(.price,b,span,small){color:#0f172a!important;}
html[data-marketak-theme="dark"] .product-card-pro .price-row del{color:#64748b!important;}
html[data-marketak-theme="dark"] .product-card-pro .btn{background:linear-gradient(135deg,#1d4ed8,#7c3aed)!important;color:#fff!important;border-color:transparent!important;}
html[data-marketak-theme="dark"] .product-card-pro .icon-btn{background:#f8fafc!important;color:#0f172a!important;border:1px solid #e2e8f0!important;}
html[data-marketak-theme="dark"] .product-card-pro .product-card-metrics-v61{background:#f8fafc!important;color:#0f172a!important;border-color:#e2e8f0!important;}
html[data-marketak-theme="dark"] .product-card-pro .product-card-metrics-v61 *{color:#0f172a!important;}

/* sliders/rails and category cards */
html[data-marketak-theme="dark"] :where(.home-strip-card,.home-rail,.products-rail,.products-slider,.category-slider,.section-rail,.featured-rail,.offers-rail,.storefront-category-track-v156,.storefront-category-track-v155){background:rgba(11,22,40,.78)!important;border:1px solid rgba(148,163,184,.22)!important;box-shadow:0 24px 80px rgba(0,0,0,.34)!important;}
html[data-marketak-theme="dark"] :where(.category-card,.category-tile,.storefront-category-card-v155,.storefront-category-card,.home-category-card){background:linear-gradient(145deg,#0b1628,#111c31)!important;border:1px solid rgba(148,163,184,.30)!important;color:#f8fbff!important;box-shadow:none!important;}
html[data-marketak-theme="dark"] :where(.category-card,.category-tile,.storefront-category-card-v155,.storefront-category-card,.home-category-card) :where(h3,b,span,p,small){color:#eaf6ff!important;opacity:1!important;}

/* Storefront exact layers */
html[data-marketak-theme="dark"] :where(.storefront-pro-hero,.storefront-cover,.storefront-top-rail-v155,.storefront-top-rail-inner-v155,.storefront-welcome-strip-v155,.storefront-welcome-strip-v156,.storefront-welcome-strip-v157,.store-tab-section,.storefront-products-themed-v1331,.storefront-products-wide-v156,.storefront-category-showcase-v155,.storefront-category-showcase-v156,.store-products-filter-shell,.store-products-filter-panel,.storefront-products-filter,.storefront-products-panel,.storefront-filter-sidebar){background:linear-gradient(145deg,#0b1628,#111c31)!important;border-color:rgba(96,165,250,.34)!important;color:#f8fbff!important;}
html[data-marketak-theme="dark"] :where(.storefront-pro-hero,.storefront-cover,.storefront-top-rail-v155,.storefront-top-rail-inner-v155,.storefront-welcome-strip-v155,.storefront-welcome-strip-v156,.storefront-welcome-strip-v157,.store-tab-section,.storefront-products-themed-v1331,.storefront-products-wide-v156,.storefront-category-showcase-v155,.storefront-category-showcase-v156,.store-products-filter-shell,.store-products-filter-panel,.storefront-products-filter,.storefront-products-panel,.storefront-filter-sidebar) :where(h1,h2,h3,b,strong,label){color:#fff!important;opacity:1!important;}
html[data-marketak-theme="dark"] :where(.storefront-pro-hero,.storefront-cover,.storefront-top-rail-v155,.storefront-top-rail-inner-v155,.storefront-welcome-strip-v155,.storefront-welcome-strip-v156,.storefront-welcome-strip-v157,.store-tab-section,.storefront-products-themed-v1331,.storefront-products-wide-v156,.storefront-category-showcase-v155,.storefront-category-showcase-v156,.store-products-filter-shell,.store-products-filter-panel,.storefront-products-filter,.storefront-products-panel,.storefront-filter-sidebar) :where(p,span,small,li){color:#dbeafe!important;opacity:1!important;}
html[data-marketak-theme="dark"] :where(.storefront-tabs a,.storefront-tabs button,.store-nav-tab,.store-tab-nav a,.store-tab-nav button){background:#f8fafc!important;color:#0f172a!important;border-color:rgba(226,232,240,.8)!important;}
html[data-marketak-theme="dark"] :where(.storefront-tabs a.active,.storefront-tabs button.active,.store-nav-tab.active,.store-tab-nav a.active,.store-tab-nav button.active){background:linear-gradient(135deg,#2563eb,#7c3aed)!important;color:#fff!important;}

/* Plans page exact classes */
html[data-marketak-theme="dark"] .plans-v189525-page{background:#06101d!important;color:#f8fbff!important;}
html[data-marketak-theme="dark"] .plans-v189525-page :where(.plans-hero-v189525,.vendor-plan-status-card-v189525,.trial-plan-v189525,.pricing-card-v189525,.compare-table-card-v189525,.plan-details-pro,.plan-features-pro,.plan-step-card,.plans-page-section){background:linear-gradient(145deg,#0b1628,#111c31)!important;border:1px solid rgba(148,163,184,.28)!important;color:#f8fbff!important;box-shadow:0 26px 86px rgba(0,0,0,.34)!important;}
html[data-marketak-theme="dark"] .plans-v189525-page :where(.plans-hero-v189525,.vendor-plan-status-card-v189525,.trial-plan-v189525,.pricing-card-v189525,.compare-table-card-v189525,.plan-details-pro,.plan-features-pro,.plan-step-card,.plans-page-section) :where(h1,h2,h3,b,strong,label,summary){color:#fff!important;opacity:1!important;}
html[data-marketak-theme="dark"] .plans-v189525-page :where(.plans-hero-v189525,.vendor-plan-status-card-v189525,.trial-plan-v189525,.pricing-card-v189525,.compare-table-card-v189525,.plan-details-pro,.plan-features-pro,.plan-step-card,.plans-page-section) :where(p,span,small,li){color:#dbeafe!important;opacity:1!important;}
html[data-marketak-theme="dark"] .plans-v189525-page :where(.plan-price-v1895251,.plan-duration-tile-v1895251,.plan-summary-strip-v1895252 span,.trial-wide-stats>*,.plan-chip){background:#081225!important;color:#f8fbff!important;border:1px solid rgba(148,163,184,.28)!important;}
html[data-marketak-theme="dark"] .plans-v189525-page .plan-duration-tile-v1895251.selected{background:linear-gradient(135deg,rgba(37,99,235,.72),rgba(124,58,237,.52))!important;border-color:rgba(125,211,252,.55)!important;}
html[data-marketak-theme="dark"] .plans-v189525-page .plan-features-pro{max-height:none!important;overflow:visible!important;background:#0f1b2f!important;}
html[data-marketak-theme="dark"] .plans-v189525-page .plan-features-pro li{background:rgba(15,23,42,.82)!important;border:1px solid rgba(148,163,184,.22)!important;border-radius:14px!important;margin:6px 0!important;padding:10px 12px!important;color:#eaf6ff!important;}
html[data-marketak-theme="dark"] .plans-v189525-page .compare-table-v189525 :where(th,td){background:#111c31!important;color:#f8fbff!important;border-color:rgba(148,163,184,.25)!important;}
html[data-marketak-theme="dark"] .plans-v189525-page .compare-table-v189525 tr:nth-child(even) :where(th,td){background:#17233a!important;}
html[data-marketak-theme="dark"] .plans-v189525-page .plan-submit-v1895251{background:linear-gradient(135deg,#2563eb,#7c3aed)!important;color:#fff!important;}

/* Win-with-marketak / referrals */
html[data-marketak-theme="dark"] .referrals-page-v25,html[data-marketak-theme="dark"] .referrals-public-v25,html[data-marketak-theme="dark"] body.view-referrals{background:#06101d!important;color:#f8fbff!important;}
html[data-marketak-theme="dark"] :where(.referrals-page-v25,.referrals-public-v25,.view-referrals) :where(.settings-card,.card,.panel,.ref-hero-v25,.ref-card-v25,.ref-rule-card,.referral-rule-card,.withdraw-form-v25,.ref-stats-v25>div,.referral-info-card){background:linear-gradient(145deg,#0b1628,#111c31)!important;border:1px solid rgba(148,163,184,.28)!important;color:#f8fbff!important;box-shadow:0 26px 80px rgba(0,0,0,.34)!important;}
html[data-marketak-theme="dark"] :where(.referrals-page-v25,.referrals-public-v25,.view-referrals) :where(h1,h2,h3,b,strong,label){color:#fff!important;opacity:1!important;}
html[data-marketak-theme="dark"] :where(.referrals-page-v25,.referrals-public-v25,.view-referrals) :where(p,span,small,li){color:#dbeafe!important;opacity:1!important;}

/* Generic last resort: light panels inside dark pages should become dark, except product media/images. */
html[data-marketak-theme="dark"] body :where(.product-super-page,.plans-v189525-page,.storefront-pro-hero,.store-tab-section,.storefront-products-wide-v156,.referrals-page-v25,.referrals-public-v25,.view-referrals) :where(.white-card,.light-card,.soft-card,.blank-card,.empty-card,.notice-card,.filter-card,.results-bar,.sidebar-card){background:linear-gradient(145deg,#0b1628,#111c31)!important;border:1px solid rgba(148,163,184,.28)!important;color:#f8fbff!important;}
html[data-marketak-theme="dark"] body :where(.product-super-page,.plans-v189525-page,.storefront-pro-hero,.store-tab-section,.storefront-products-wide-v156,.referrals-page-v25,.referrals-public-v25,.view-referrals) :where(.white-card,.light-card,.soft-card,.blank-card,.empty-card,.notice-card,.filter-card,.results-bar,.sidebar-card) *{color:#eaf6ff!important;opacity:1!important;}

@media(max-width:780px){.marketak-theme-toggle{width:40px!important;height:40px!important;min-width:40px!important;}html[data-marketak-theme="dark"] .product-v23 :where(.product-buy-panel,.product-gallery-pro,.gallery-stage){border-radius:24px!important;}html[data-marketak-theme="dark"] .product-share-center-v58 .share-center-card-v58{width:calc(100vw - 22px)!important;border-radius:24px!important;}}
