/* Keep the original light design and component geometry. Pair colors in dark mode. */
:root{--delivery-surface:#fff;--delivery-raised:#f8faff;--delivery-ink:#101828;--delivery-muted:#667085;--delivery-line:#dce6f5;--delivery-link:#155eef}
:root[data-theme="dark"]{color-scheme:dark;--es-bg:#0f172a;--es-bg-2:#17243b;--es-surface:#18243a;--es-ink:#edf3fd;--es-muted:#aebdd3;--es-line:#34465e;--es-line-2:#34465e;--es-blue:#91bbff;--delivery-surface:#18243a;--delivery-raised:#203049;--delivery-ink:#edf3fd;--delivery-muted:#aebdd3;--delivery-line:#34465e;--delivery-link:#91bbff;--text-main:#edf3fd;--text-muted:#aebdd3;--card-bg:#18243a;--soft-bg:#203049;--border-color:#34465e}
html[data-theme="dark"] body.endshopit-marketplace-body{background:linear-gradient(180deg,#0f172a,#142039)!important;color:var(--es-ink)!important}
html[data-theme="dark"] .endshopit-marketplace-body :is(.es-market-navbar,.navbar,.dropdown-menu,.card,.table,.modal-content,.es-home-stats,.es-preview-card,.es-product-card,.es-market-toolbar,.es-package-panel,.es-package-item,.admin-tabs-wrap,.admin-quick-section,.admin-stat-card,.admin-quick-card,.admin-analytics-card,.admin-settings-card,.setting-box,.front-hero,.front-card,.product-admin-card,.random-info-card,.mystery-box-card,.account-content-card,.account-sidebar-card,.es-kpi,.es-chart-card,.es-recent-card,.es-admin-shortcuts,.es-demo-catalog){background:var(--es-surface)!important;color:var(--es-ink)!important;border-color:var(--es-line)!important}
html[data-theme="dark"] .endshopit-marketplace-body :is(.es-market-metrics>div,.es-filter-pills a,.es-market-search,.es-market-guide>div,.es-category-rail>a,.es-package-meta span,.es-preview-media,.es-product-media,.es-package-image,.es-dropdown-head,.es-account-pill,.es-wallet-panel,.es-collapse-close,.es-btn-soft,.es-nav-btn.ghost,.es-navbar-toggler,.es-admin-stock-strip>div,.es-admin-stock-strip>a,.es-admin-shortcuts>a,.stock-info-box,.stock-panel,.stock-product-head,.stock-edit-product,.settings-head,.stat-pill,.es-admin-details,.stock-box,.admin-tabs-scroll .admin-tab:not(.active)){background:var(--delivery-raised)!important;color:var(--es-ink)!important;border-color:var(--es-line)!important}
html[data-theme="dark"] .endshopit-marketplace-body :is(.form-control,.custom-select,textarea,.table th,.es-market-search input,.btn-light,.dataTables_wrapper input,.dataTables_wrapper select){background:var(--delivery-raised)!important;color:var(--es-ink)!important;border-color:var(--es-line)!important}
html[data-theme="dark"] .endshopit-marketplace-body :is(.es-brand-copy b,.es-product-title h3,.es-preview-title h3,.es-package-title h3,.es-market-toolbar b,.es-market-metrics strong,.es-package-price strong,.es-product-facts strong,.es-preview-facts strong,.es-admin-stock-strip b,.es-kpi strong,.es-chart-total strong,.es-admin-head h1,.es-admin-shortcuts b,.stock-product-head h3,.dropdown-item,.close,.navbar .nav-link){color:var(--es-ink)!important}
html[data-theme="dark"] .endshopit-marketplace-body :is(.es-product-body>p,.es-preview-body>p,.es-package-desc,.es-market-guide small,.es-market-metrics small,.es-toolbar-title small,.es-dropdown-head small,.es-nav-dropdown .dropdown-item small,.es-product-facts small,.es-preview-facts small,.es-package-meta,.es-admin-head p,.es-chart-head p,.es-kpi small,.es-admin-stock-strip small,.es-admin-shortcuts small,.dataTables_info,.dataTables_length,.dataTables_filter,.dataTables_paginate){color:var(--es-muted)!important}
html[data-theme="dark"] .endshopit-marketplace-body :is(.dropdown-item:hover,.es-filter-pills a.active,.navbar .nav-link:hover,.table-hover tbody tr:hover){background:#29476f!important;color:#eaf2ff!important}
html[data-theme="dark"] .endshopit-marketplace-body :is(.es-shop-footer,.es-empty-market,.es-empty){background:var(--es-surface)!important;color:var(--es-muted)!important;border-color:var(--es-line)!important}
html[data-theme="dark"] .endshopit-marketplace-body :is(.btn-outline-primary,.es-card-btn,.es-btn-soft){color:var(--es-blue)!important;border-color:var(--es-line)!important}
/* Purchase dialogs retain their original layout, including both confirmation steps. */
.endshop-buy-preview{text-align:left;font-size:13px;line-height:1.7}
.endshop-buy-hero.compact{display:flex;align-items:center;gap:14px;padding:16px;border-radius:15px;margin-bottom:12px}
.endshop-buy-icon.compact{width:44px;height:44px;flex:0 0 44px;display:grid;place-items:center;border-radius:12px;font-size:20px;color:#fff}
.endshop-buy-hero h3{font-size:21px!important;margin:5px 0 0!important}
.endshop-buy-kicker{font-size:10px!important;font-weight:800}
.endshop-buy-mini-meta{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:12px}
.endshop-buy-mini-meta>div{padding:14px;border-radius:12px;font-size:12px}
.endshop-buy-mini-meta span{display:block;font-size:10px;margin-bottom:5px}
.endshop-buy-info-block{padding:14px;border:1px solid var(--delivery-line);border-radius:12px;margin:10px 0}
.endshop-buy-info-title{font-size:12px;font-weight:800;margin-bottom:6px}
.endshop-buy-info-title i{margin-right:5px;color:var(--delivery-link)}
.endshop-buy-info-text{font-size:12px;line-height:1.8}
.endshop-buy-note.compact{padding:12px;font-size:10px;border-radius:12px;line-height:1.8}
.endshop-buy-popup{padding:20px!important}.endshop-buy-popup .swal2-html-container{margin:0!important}.endshop-buy-popup .swal2-actions{margin-top:18px!important}
.endshop-modal-sale-price b{font-size:20px}.endshop-modal-old-price{text-decoration:line-through}.endshop-modal-sale-price em{display:block;font-size:10px}
.endshopit-marketplace-body :is(.swal2-popup,.swal2-title,.swal2-html-container,.swal2-content){background:var(--delivery-surface);color:var(--delivery-ink)!important}
.endshopit-marketplace-body :is(.endshop-buy-hero,.endshop-buy-mini-meta>div,.endshop-buy-info-block,.endshop-buy-note){background:var(--delivery-raised)!important;color:var(--delivery-ink)!important;border-color:var(--delivery-line)!important}
.endshopit-marketplace-body :is(.endshop-buy-preview h3,.endshop-buy-info-title,.endshop-buy-info-text,.endshop-buy-mini-meta b){color:var(--delivery-ink)!important}
.endshopit-marketplace-body :is(.endshop-buy-kicker,.endshop-modal-sale-price em){color:var(--delivery-link)!important}
.endshopit-marketplace-body :is(.endshop-buy-mini-meta span,.endshop-buy-empty){color:var(--delivery-muted)!important}
#themeToggle:focus-visible{outline:3px solid #2970ff;outline-offset:3px}
html[data-theme="dark"] .endshopit-marketplace-body .es-market-hero{background:linear-gradient(130deg,#182c4b,#1a3948)!important;color:var(--es-ink)!important;border-color:var(--es-line)!important}
html[data-theme="dark"] .endshopit-marketplace-body .es-market-hero h1{color:var(--es-ink)!important}
html[data-theme="dark"] .endshopit-marketplace-body .es-market-hero p{color:var(--es-muted)!important}
html[data-theme="dark"] .endshopit-marketplace-body :is(.es-card-category,.es-card-btn,.es-nav-dropdown .dropdown-item>i){color:#155eef!important}
html[data-theme="dark"] .endshopit-marketplace-body :is(.es-buying-experience,.es-experience-grid>div){background:var(--es-surface)!important;color:var(--es-ink)!important;border-color:var(--es-line)!important}
html[data-theme="dark"] .endshopit-marketplace-body :is(.es-preview-head h2,.es-buying-experience h2,.es-experience-grid b,.es-home-stats strong,.es-category-rail b){color:var(--es-ink)!important}
html[data-theme="dark"] .endshopit-marketplace-body :is(.admin-quick-card>i,.admin-stat-card>span){color:#155eef!important}
html[data-theme="dark"] .endshopit-marketplace-body :is(.es-recent-table td,.es-recent-table th){background:var(--es-surface)!important;color:var(--es-ink)!important;border-color:var(--es-line)!important}
.endshopit-marketplace-body .alert-warning{background:#fff4d9!important;color:#593b00!important;border-color:#edce85!important}
.endshopit-marketplace-body .alert-warning a{color:#155eef!important}
