/* Shared screen palette, enabled by the appearance control in every layout. */
:root {
    color-scheme: light;
    --bg: #f4f6f8;
    --bg-2: #fff;
    --surface: #fff;
    --surface-2: #eef1f4;
    --surface-soft: #edf0f3;
    --panel: var(--surface);
    --panel-2: var(--surface-2);
    --border: #cdd3d9;
    --stroke: var(--border);
    --stroke-soft: #e2e6e9;
    --border-gold: #bf9b42;
    --stroke-gold: var(--border-gold);
    --gold: #986d08;
    --gold-2: #755200;
    --gold-3: #bc8c0c;
    --gold-deep: #78560a;
    --text: #19222b;
    --text-soft: #344352;
    --muted: #526170;
    --muted-2: #596776;
    --text-muted: var(--muted);
    --accent: var(--gold-2);
    --danger: #ac2639;
    --success: #17683d;
    --shadow: 0 5px 20px rgb(30 45 58 / 8%);
    background: var(--bg);
}
html body[data-version] { color: var(--text); background: var(--bg); }
html body::before { opacity: 0; }

/* Navegación, catálogo y cuenta. Las imágenes conservan sus colores. */
html body :is(.topbar, .mobile-topbar, .sidebar, .site-footer, .mobile-footer, .search-panel,
    .mobile-bottom-nav-wrapper, .mobile-bottom-nav, .search-suggest-dropdown,
    .size-filter__panel, .cart-drawer, .auth-container, .auth-mobile-container,
    .product-card, .mobile-product-card, .detail-info, .detail-accordion, .detail-accordion-mobile,
    .accordion-item, .checkout-card, .checkout-summary, .benefit-strip, .quick-benefits,
    .benefits-panel, .page-card, .m-account-card, .m-order-card, .m-subcategory-list,
    .m-detail-section, .cart-row, .cart-total, .club-card, .page-hero) {
    background: var(--surface); color: var(--text); border-color: var(--border); box-shadow: var(--shadow);
}
html body :is(.searchbar, .category-chips a, .category-chips button, .size-pill, .product-card__size-tag,
    .m-subcat-children, .spec-list div, .cart-line, .club-section) {
    color: var(--text-soft); background-color: var(--surface-2); border-color: var(--border);
}
html body :is(.product-name, .product-card__name, .product-card__title, .product-card__info h3,
    .mobile-product-card h3, .section-head h2, .footer-col h4, .cart-line h3, .accordion-header-m,
    .m-subcat-parent strong, .m-account-card h3, .suggest-text strong) { color: var(--text); }
html body :is(.product-card__price, .suggest-price, .price, .section-title, .bnav-active,
    .mobile-bottom-nav .bnav-active, .product-price) { color: var(--gold-2); }
html body :is(.site-footer a, .footer-bottom, .mobile-footer, .mobile-bottom-nav a:not(.bnav-active),
    .sidebar a, .auth-switch, .m-account-card p, .suggest-text small) { color: var(--muted); }
html body .mobile-footer { background: var(--surface) !important; color: var(--muted) !important; }
html body :is(.mobile-topbar, .topbar) :is(.brand, .mobile-brand) {
    background-color: #13171c; border-radius: 6px; padding-inline: 6px;
}
html body .auth-hero { background: #14191d; }
html body :is(.hero-copy, .hero-mobile, .auth-hero-overlay, .mini-promo, .premium-info-card,
    .mobile-category-card, .bottom-banners, .mm-bw-signoff) {
    --text: #fff; --text-soft: #eff1f3; --muted: #dee3e8; --gold-2: #f5c43c; color: var(--text);
}
html body :is(.badge, .shipping-badge-premium, .reference-badge-premium) { --gold-2: #f5c43c; }
html body :is(.btn--primary, .suite-btn:not(.suite-btn--ghost, .suite-btn--danger), .searchbar button, .cart-action strong) {
    background: #f2bd22; color: #201904;
}

/* Administración y Suite. */
html body :is(.admin-layout, .admin-content) { background-color: var(--bg); }
html body :is(.admin-side, .admin-card, .admin-section-card, .admin-modal, .premium-table-card,
    .metric-grid article, .suite-card, .suite-kpi, .suite-location, .suite-context-help,
    .suite-home__action, .suite-classification-line, .suite-lookup-results,
    .global-search__form, .global-search__popup, .docs-more > div, .report-tools,
    .report-group, .report-description > p, .payroll__sticky) {
    background: var(--surface); color: var(--text); border-color: var(--border);
}
html body[data-version] .admin-side nav a.is-active { background: #fff2cc; color: #664a05; }
html body .suite-location { border-left-color: var(--gold); }
html body :is(.suite-home__action, .suite-home__links a, .global-search__result) { color: var(--text) !important; }
html body :is(.suite-location strong, .global-search__heading, .suite-home__icon, .suite-home__group h2 svg,
    .suite-context-help summary, .suite-context-help a, .report-group summary) { color: var(--gold-2); }
html body .global-search__all { color: var(--gold-2) !important; }
html body :is(.suite-location a, .suite-location__label, .suite-home__action small, .suite-filters label,
    .suite-section-filter label, .suite-section-filter small, .suite-catalog-filter [role=status],
    .global-search__key, .global-search__result small, .global-search__status,
    .suite-context-help__body, .report-description, .suite-user__meta small) { color: var(--muted); }
html body :is(.suite-home__links a, .suite-classification-form, .suite-table th, .suite-table td,
    .admin-table th, .admin-table td, .admin-section-card, .suite-section-filter button) { border-color: var(--border); }
html body :is(.suite-table-wrap, .suite-pre, .suite-section-filter button, .suite-catalog-filter button,
    .global-search__key, .suite-home__links a:hover) { background-color: var(--surface-2); color: var(--text); }
html body .global-search { background: var(--bg); }
html body[data-page="suite"] :is(.suite-money--due, [data-money-tone="due"]) { color: var(--danger); }
html body[data-page="suite"] :is(.suite-money--credit, [data-money-tone="credit"]) { color: var(--success); }
html body .payroll__warning { background: #fff4cd; color: #604d14; }

/* Controles que en las pantallas antiguas tenían colores fijos. */
html body[data-version] :is(input:not([type=hidden],[type=checkbox],[type=radio],[type=range],[type=color],[type=image],[type=submit],[type=button]),
    textarea, select, select option) {
    color: var(--text); background-color: var(--surface); border-color: #96a3af; color-scheme: light;
}
html body[data-version] :is(input, textarea)::placeholder { color: #596978; opacity: 1; }
html body :is(.suite-home__action, .m-account-card, .suite-btn--ghost):hover { border-color: var(--gold); }
html body :focus-visible { outline-color: #846000; }
