/* AID uses one light palette across the marketplace and backoffice. */
:root {
  color-scheme: light;
  --mt-bg: #f5f5f7; --mt-surface: #fff; --mt-soft: #f8f9fb; --mt-quiet: #f8f9fb;
  --mt-ink: #1d1d1f; --mt-muted: #6e6e73; --mt-line: #e5e5ea;
  --mt-accent: #0071e3; --mt-hover: #0062c4; --mt-tint: #eaf3ff; --mt-on-accent: #fff;
  --mt-hero: #f5f5f7; --mt-hero-ink: #1d1d1f; --mt-hero-muted: #6e6e73;
  --mt-focus: #0071e3; --mt-shadow: #1d1d1f12; --mt-photo: #fff;
}
/* Hide any leftover chooser markup from an older cached shell. */
.mall-theme-switcher, .mt-theme-toggle { display: none !important; }

/* Shared blue-gray palette; legacy names receive the same visual roles. */
:root[data-mall-theme]{background:var(--mt-bg);color:var(--mt-ink);--mall-blue:var(--mt-accent);--mall-ink:var(--mt-ink);--mall-muted:var(--mt-muted);--mall-line:var(--mt-line)}
:root[data-mall-theme] body{background:var(--mt-bg);color:var(--mt-ink)}
:root[data-mall-theme] :is(.sm-workspace,.sm-storefront){--sm-blue:var(--mt-accent);--sm-ink:var(--mt-ink);--sm-muted:var(--mt-muted);--sm-line:var(--mt-line);--sm-surface:var(--mt-soft);background:var(--mt-bg);color:var(--mt-ink)}
:root[data-mall-theme] :is(.sc-cart,.sc-empty,.sc-success){--sc-accent:var(--mt-accent);color:var(--mt-ink)}
:root[data-mall-theme] :focus-visible{outline-color:var(--mt-focus)}

/* Quiet framing; only meaningful actions receive the accent fill. */
:root[data-mall-theme] :is(.mall-header,.mall-navigation,.mall-promises,.mall-footer,.mall-gate,.mall-auth,.mall-console-main #mall-content){background:var(--mt-surface);border-color:var(--mt-line);color:var(--mt-ink)}
:root[data-mall-theme] .mall-utility{background:var(--mt-bg);border-color:var(--mt-line);color:var(--mt-muted)}
:root[data-mall-theme] body[data-mall-page="market"] .mall-brand-mark{background:var(--mt-soft);color:var(--mt-ink)}
:root[data-mall-theme] body[data-mall-page="market"] .mall-brand strong{color:var(--mt-ink)}
:root[data-mall-theme] .mall-search{background:var(--mt-surface);border-color:var(--mt-line)}
:root[data-mall-theme] .mall-search:focus-within{border-color:var(--mt-accent);box-shadow:none}
:root[data-mall-theme] .mall-search input{color:var(--mt-ink)}
:root[data-mall-theme] .mall-search input::placeholder{color:var(--mt-muted)}
:root[data-mall-theme] .mall-search button{background:var(--mt-accent);color:var(--mt-on-accent)}
:root[data-mall-theme] .mall-search button:hover{background:var(--mt-hover)}
:root[data-mall-theme] body[data-mall-page="market"] .mall-purchase-link{background:var(--mt-surface);border-color:var(--mt-line);color:var(--mt-ink)}
:root[data-mall-theme] .mall-purchase-link svg{stroke:var(--mt-ink)}
:root[data-mall-theme] .mall-purchase-link:hover{border-color:var(--mt-accent)}
:root[data-mall-theme] [data-mall-cart-count]{background:var(--mt-accent);color:var(--mt-on-accent)}
:root[data-mall-theme] .mall-navigation{border-bottom-width:1px}
:root[data-mall-theme] body[data-mall-page="market"] .mall-navigation a{background:transparent;color:var(--mt-ink)}
:root[data-mall-theme] body[data-mall-page="market"] .mall-navigation a[aria-current="page"]{background:var(--mt-tint);color:var(--mt-accent)}
:root[data-mall-theme] body[data-mall-page="market"] .mall-navigation a[aria-current="page"]:after{display:block;height:2px;background:var(--mt-accent)}
:root[data-mall-theme] :is(.mall-brand small,.mall-hot-search,.mall-hot-search a:first-child,.mall-hot-search span,.mall-navigation span,.mall-footer,.mall-footer span,.mall-promises small,.mall-auth-header p,.mall-auth-foot,.mall-auth-form small,.mall-auth-form label,.mall-auth-tabs button){color:var(--mt-muted)}
:root[data-mall-theme] :is(.mall-promises span,.mall-footer strong){color:var(--mt-ink)}
:root[data-mall-theme] .mall-promises b{color:var(--mt-muted);border-color:var(--mt-line)}
:root[data-mall-theme] .mall-auth-close{background:var(--mt-soft);color:var(--mt-muted)}
:root[data-mall-theme] .mall-auth-tabs button[aria-selected="true"]{color:var(--mt-accent);border-color:var(--mt-accent)}
:root[data-mall-theme] #mall-toast{background:var(--mt-ink);color:var(--mt-surface)}

/* Shared controls also cover store and procurement dialogs outside the main host. */
:root[data-mall-theme] body[data-mall-page="supplier"] :is(.mall-brand strong,.mall-navigation a,.mall-purchase-link){color:var(--mt-ink)}
:root[data-mall-theme] body[data-mall-page="supplier"] .mall-brand-mark{color:var(--mt-accent)}
:root[data-mall-theme] body[data-mall-page="supplier"] .mall-purchase-link{background:var(--mt-soft);border-color:var(--mt-line)}
:root[data-mall-theme] body[data-mall-page="supplier"] :is(.mall-search-area>p,.sm-tabs button){color:var(--mt-muted)}
:root[data-mall-theme] :is(.sm-tabs,.sm-listing-row,.sm-authorization-row,.sm-shop-row,.sm-upstream-line){border-color:var(--mt-line)}
:root[data-mall-theme] .sm-tabs span{background:var(--mt-soft);color:var(--mt-ink)}
:root[data-mall-theme] .sm-tabs .is-active{color:var(--mt-accent);border-bottom-color:var(--mt-accent)}
:root[data-mall-theme] :is(.button,.sm-storefront .button,.sm-merchandise-dialog .button){background:var(--mt-surface);color:var(--mt-ink);border-color:var(--mt-line)}
:root[data-mall-theme] :is(.button:hover,.sm-storefront .button:hover,.sm-merchandise-dialog .button:hover){background:var(--mt-tint);color:var(--mt-accent);border-color:var(--mt-accent)}
:root[data-mall-theme] :is(.button.primary,.sm-storefront .button.primary,.sm-merchandise-dialog .button.primary){background:var(--mt-accent);color:var(--mt-on-accent);border-color:var(--mt-accent)}
:root[data-mall-theme] :is(.button.primary:hover,.sm-storefront .button.primary:hover,.sm-merchandise-dialog .button.primary:hover){background:var(--mt-hover);color:var(--mt-on-accent);border-color:var(--mt-hover)}
:root[data-mall-theme] :is(.sm-check input,.sc-cart input[type="checkbox"]){accent-color:var(--mt-accent)}
:root[data-mall-theme] :is(.mall-auth-form input,.sm-search input,.sm-searchbar select,.sm-form-grid input:not([type="checkbox"]),.sm-form-grid select,.sm-form-grid textarea,.sm-field input,.sm-field textarea,.sm-quantity-row input,.sm-store-heading select,.sm-order-controls input,.sc-quantity input,.sc-review form input,.sc-review select,.sc-review textarea){background:var(--mt-surface);color:var(--mt-ink);border-color:var(--mt-line)}
:root[data-mall-theme] :is(.sm-order-controls input:focus,.sm-photo-thumbs>button.is-active){border-color:var(--mt-accent)}

/* Shop furniture and text retain their existing hierarchy. */
:root[data-mall-theme] :is(.sm-mall-categories,.sm-buyer-entry,.sm-brand-store,.sm-directory-shop,.sm-mall-filters,.sm-mall-shop-strip,.sm-storefront .sm-product-card,.sm-storefront .sm-pagination,.sm-storefront .sm-empty,.sm-storefront .sm-selected-shop,.sm-storefront .sm-panel-toolbar,.sm-storefront .sm-order-list,.sm-storefront .sm-shop-list,.sm-order-row,.sm-order-controls,.sm-floor-body,.sc-shop,.sc-review,.sc-empty,.sc-success){background:var(--mt-surface);border-color:var(--mt-line);color:var(--mt-ink)}
:root[data-mall-theme] :is(.sm-storefront .sm-product-name,.sm-brand-store-title strong,.sm-section-heading h2,.sm-mall-categories>button,.sm-filter-line button,.sm-sort-options button,.sm-store-heading label,.sm-shop-breadcrumb button,.sm-mall-shop-strip>strong,.sm-side-link){color:var(--mt-ink)}
:root[data-mall-theme] :is(.sm-muted,.sm-intro,.sm-page-head p,.sm-product-brand,.sm-product-copy>p,.sm-stock-copy,.sm-shop-name,.sm-card-price>span,.sm-selected-shop small,.sm-empty p,.sm-loading,.sm-onboarding,.sm-listing-row small,.sm-section-intro,.sm-authorization-row p,.sm-shop-row p,.sm-authorization-row small,.sm-shop-row small,.sm-order-row small,.sm-product-summary p,.sm-shop-summary p,.sm-detail-price>span,.sm-details dt,.sm-note,.sm-order-heading p,.sm-order-line small,.sm-order-section h4 small,.sm-history-row small,.sm-quantity-row small,.sm-feature-list,.sm-directory-heading p,.sm-directory-shop-head p,.sm-directory-description,.sm-directory-shop-foot,.sm-detail-tagline,.sm-variant-options legend,.sm-variant-options legend span,.sm-variant-options button small,.sm-detail-store span,.sm-detail-description p,.sm-mall-categories h2,.sm-mall-categories>button>span:last-child,.sm-buyer-entry>p,.sm-buyer-shortcuts button,.sm-buyer-shortcuts a,.sm-mall-bulletin p,.sm-section-heading p,.sm-section-heading>button,.sm-brand-store-title small,.sm-brand-arrow,.sm-brand-store-bottom>span,.sm-shop-breadcrumb,.sm-order-controls>label,.sm-order-statuses button,.sm-sort-note,.sm-results-summary,.sm-mall-sort,.sm-side-link small){color:var(--mt-muted)}
:root[data-mall-theme] :is(.sm-card-detail,.sm-results-summary button,.sm-shop-brand-label,.sm-buyer-shortcuts span,.sm-brand-join b,.sm-brand-store-bottom>button,.sm-tabs .is-active,.sm-side-link.is-active,.sm-side-link.is-active small){color:var(--mt-accent)}
:root[data-mall-theme] .sm-storefront .sm-card-price strong{color:var(--mt-ink)}
:root[data-mall-theme] .sm-storefront .sm-card-price .sm-price-hidden{color:var(--mt-muted)}
:root[data-mall-theme] :is(.sm-buyer-avatar,.sm-brand-monogram,.sm-store-avatar,.sm-badge){background:var(--mt-tint);color:var(--mt-accent);border-color:var(--mt-line)}
:root[data-mall-theme] :is(.sm-badge.is-muted,.sm-tabs span,.sm-mall-sort,.sm-filter-line>strong,.sm-mall-shop-strip>button,.sm-confirm-summary,.sm-close,.sc-toolbar,.sc-row.is-unavailable){background:var(--mt-soft);color:var(--mt-muted);border-color:var(--mt-line)}
:root[data-mall-theme] :is(.sm-mall-categories>button:hover,.sm-order-row:hover){background:var(--mt-tint);color:var(--mt-accent)}
:root[data-mall-theme] :is(.sm-filter-line button.is-active,.sm-variant-options button.is-active,.sm-mall-shop-strip>button.is-active,.sm-sort-options button.is-active){background:var(--mt-tint);color:var(--mt-accent);border-color:var(--mt-accent)}
:root[data-mall-theme] :is(.sm-order-statuses button.is-active,.sm-tabs .is-active){color:var(--mt-accent);border-color:var(--mt-accent)}
:root[data-mall-theme] .sm-storefront .sm-selected-shop{border-top-color:var(--mt-line)}
:root[data-mall-theme] :is(.sm-brand-store-bottom>button,.sm-variant-options button){background:var(--mt-surface);border-color:var(--mt-line)}
:root[data-mall-theme] .sm-brand-join{background:var(--mt-soft);color:var(--mt-ink)}
:root[data-mall-theme] .sm-brand-join strong{color:var(--mt-ink)}
:root[data-mall-theme] .sm-brand-join span{color:var(--mt-muted)}

/* A calm hero and pale category panels let the actual product photos lead. */
:root[data-mall-theme] .sm-product-showcase{background:var(--mt-hero)}
:root[data-mall-theme] .sm-showcase-title h2{color:var(--mt-hero-ink);text-shadow:none}
:root[data-mall-theme] :is(.sm-showcase-kicker,.sm-showcase-title p){color:var(--mt-hero-muted)}
:root[data-mall-theme] .sm-showcase-bottom{background:var(--mt-soft);color:var(--mt-muted)}
:root[data-mall-theme] .sm-hero-cta{background:var(--mt-accent);color:var(--mt-on-accent)}
:root[data-mall-theme] .sm-storefront .sm-hero-cta:hover{background:var(--mt-hover);color:var(--mt-on-accent)}
:root[data-mall-theme] .sm-showcase-item{background:var(--mt-photo);box-shadow:0 8px 18px var(--mt-shadow)}
:root[data-mall-theme] .sm-category-floor{--floor-color:var(--mt-line)!important}
:root[data-mall-theme] .sm-category-floor>.sm-section-heading{border-bottom-width:1px}
:root[data-mall-theme] .sm-category-floor>.sm-section-heading h2{color:var(--mt-ink)}
:root[data-mall-theme] .sm-floor-poster{background:var(--mt-soft);color:var(--mt-ink)}
:root[data-mall-theme] :is(.sm-floor-poster>span,.sm-floor-poster p){color:var(--mt-muted)}
:root[data-mall-theme] .sm-floor-poster button{color:var(--mt-accent);border-color:var(--mt-line);background:var(--mt-surface)}
:root[data-mall-theme] :is(.sm-product-cover,.sm-brand-products,.sm-directory-photos,.sm-detail-image,.sm-detail-media .sm-detail-image,.sm-photo-thumbs>button,.sm-product-summary>img,.sm-listing-row>img,.sc-product img){background:var(--mt-photo)}
:root[data-mall-theme] :is(.sm-catalog-tag,.sm-supply-tag){background:var(--mt-quiet);color:var(--mt-muted)}
:root[data-mall-theme] .sm-showcase-item span{color:var(--mt-muted)}
:root[data-mall-theme] .sm-brand-products>span{color:var(--mt-muted)}

/* Dialogs and forms share the same palette. Status colors stay semantic. */
:root[data-mall-theme] .sm-dialog{background:var(--mt-surface);border-color:var(--mt-line);color:var(--mt-ink)}
:root[data-mall-theme] .sm-dialog-head{background:var(--mt-surface);border-color:var(--mt-line)}
:root[data-mall-theme] :is(.sm-form-grid>label,.sm-field,.sm-variant-options button){color:var(--mt-muted)}
:root[data-mall-theme] :is(.sm-detail-information .sm-detail-price,.sm-catalog-notice,.sm-detail-store,.sm-merchandise-dialog .sm-public-details .sm-details){background:var(--mt-soft);color:var(--mt-muted);border-color:var(--mt-line)}
:root[data-mall-theme] .sm-detail-information .sm-detail-price strong{color:var(--mt-ink)}
:root[data-mall-theme] :is(.sm-tabs,.sm-market-sidebar,.sm-authorized-filter,.sm-pagination,.sm-listing-row,.sm-authorization-row,.sm-shop-row,.sm-order-row,.sm-form-actions,.sm-order-line,.sm-order-total,.sm-order-section,.sm-history-row,.sm-quantity-row,.sm-upstream-line,.sm-public-details,.sm-filter-line+.sm-filter-line,.sm-buyer-entry>p.sm-buyer-note,.sm-mall-bulletin,.sm-brand-store-bottom,.sm-storefront .sm-shop-name,.sm-storefront .sm-floor-body .sm-product-card,.sm-sort-options button,.sm-sort-options button:first-child,.sc-shop>header,.sc-row,.sc-summary,.sc-success a){border-color:var(--mt-line)}

/* Procurement uses the same palette without changing selection or price semantics. */
:root[data-mall-theme] :is(.sc-heading small,.sc-heading p,.sc-shop>header span,.sc-product span,.sc-source,.sc-quantity small,.sc-text,.sc-summary>p,.sc-review form label,.sc-footnote,.sc-empty p,.sc-success p,.sc-success a span){color:var(--mt-muted)}
:root[data-mall-theme] :is(.sc-subtotal,.sc-total strong){color:var(--mt-ink)}
:root[data-mall-theme] :is(.sc-product .sc-text,.sc-text:hover,.sc-empty-icon,.sc-success a small){color:var(--mt-accent)}
:root[data-mall-theme] .sc-review{border-top-color:var(--mt-line)}
:root[data-mall-theme] .sc-success a{color:var(--mt-ink)}

@media(max-width:600px){
  :root[data-mall-theme] .sc-price, :root[data-mall-theme] .sc-price:before { color:var(--mt-muted); }
}
