/* Final dark-mode layer. Loaded after every page stylesheet and inline late_css block. */

.navbar {
    height: 84px !important;
}

body {
    padding-top: 84px !important;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --dm-bg: #17212b;
    --dm-bg-soft: #1c2833;
    --dm-surface: #23313e;
    --dm-surface-2: #2b3b49;
    --dm-border: #405568;
    --dm-text: #f5f1e8;
    --dm-muted: #b4c0ca;
    --dm-primary: #f08a73;
    --dm-link: #69c8be;
    --dm-danger-bg: #432c31;
    --dm-danger: #ffb0a7;
    --dm-warning-bg: #453b2b;
    --dm-warning: #f4cb7b;
    --dm-success-bg: #243e3b;
    --dm-success: #8ed9cb;
    --primary: #f08a73!important;
    --primary-color: #f08a73!important;
    --secondary: #69c8be!important;
    --secondary-color: #69c8be!important;
    --accent: #f4cb7b!important;
    --theme-blue: #69c8be;
    --theme-teal: #69c8be;
    --theme-coral: #f08a73;
    --theme-sun: #f4cb7b;
    --theme-ink: #f5f1e8;
    --theme-surface: #23313e;
    --theme-soft: #2b3b49;
    --theme-line: #405568;
    --theme-muted: #b4c0ca;
    --dark: #f5f1e8!important;
    --dark-color: #f5f1e8!important;
    --color-text-dark: #f5f1e8!important;
    --light-blue-1: #202d38!important;
    --light-blue-2: #2b3b49!important;
}

html[data-theme="dark"] body,
html[data-theme="dark"] .main-content,
html[data-theme="dark"] .site-canvas {
    background: #17212b !important;
    color: var(--dm-text) !important;
}


/* Navigation */

html[data-theme="dark"] .topbar {
    background: #111922 !important;
}

html[data-theme="dark"] .navbar,
html[data-theme="dark"] .navbar.is-scrolled,
html[data-theme="dark"] .navbar-menu,
html[data-theme="dark"] .user-dropdown {
    background: rgba(28, 40, 51, .98) !important;
    border-color: var(--dm-border) !important;
    color: var(--dm-text) !important;
}

html[data-theme="dark"] .navbar-brand,
html[data-theme="dark"] .navbar-menu a,
html[data-theme="dark"] .user-menu-toggle,
html[data-theme="dark"] .user-dropdown a {
    color: var(--dm-text) !important;
}

html[data-theme="dark"] .navbar-menu a:hover,
html[data-theme="dark"] .navbar-menu a.active,
html[data-theme="dark"] .user-dropdown a:hover {
    background: var(--dm-surface-2) !important;
    color: var(--dm-primary) !important;
}

html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .mobile-menu-toggle,
html[data-theme="dark"] .user-menu-toggle {
    background: var(--dm-surface-2) !important;
    border-color: var(--dm-border) !important;
    color: var(--dm-warning) !important;
}


/* Page backgrounds */

html[data-theme="dark"] .profile-wrapper,
html[data-theme="dark"] .auth-wrapper,
html[data-theme="dark"] .auth-section,
html[data-theme="dark"] .products-section,
html[data-theme="dark"] .product-detail-section,
html[data-theme="dark"] .blog-section,
html[data-theme="dark"] .blog-page,
html[data-theme="dark"] .cart-section,
html[data-theme="dark"] .cart-wrapper,
html[data-theme="dark"] .shop-cart-page,
html[data-theme="dark"] .checkout-page,
html[data-theme="dark"] .product-result-page,
html[data-theme="dark"] .base-payment-section,
html[data-theme="dark"] .dashboard-wrapper,
html[data-theme="dark"] .order-form-section,
html[data-theme="dark"] .order-form-wrapper,
html[data-theme="dark"] .plan-page,
html[data-theme="dark"] .workout-dashboard {
    background: #17212b !important;
    color: var(--dm-text) !important;
}

html[data-theme="dark"] .breadcrumb-wrapper,
html[data-theme="dark"] .base-payment-breadcrumb {
    background: var(--dm-bg-soft) !important;
    border-color: var(--dm-border) !important;
}

html[data-theme="dark"] .breadcrumb-nav,
html[data-theme="dark"] .base-payment-breadcrumb-nav,
html[data-theme="dark"] .breadcrumb-nav span,
html[data-theme="dark"] .base-payment-breadcrumb-nav span {
    color: #f2f7f8 !important;
}

html[data-theme="dark"] .breadcrumb-nav a,
html[data-theme="dark"] .base-payment-breadcrumb-nav a {
    color: #9fe3da !important;
}

html[data-theme="dark"] .breadcrumb-nav a:hover,
html[data-theme="dark"] .base-payment-breadcrumb-nav a:hover {
    color: #c5fff7 !important;
}

html[data-theme="dark"] .breadcrumb-nav>i,
html[data-theme="dark"] .breadcrumb-nav i.fa-chevron-left,
html[data-theme="dark"] .base-payment-breadcrumb-nav>i {
    color: #78909c !important;
}

html[data-theme="dark"] .breadcrumb-wrapper,
html[data-theme="dark"] .base-payment-breadcrumb {
    background: #111c25 !important;
    border-bottom: 1px solid #314653 !important;
}


/* Cards and content surfaces */

html[data-theme="dark"] body .profile-header,
html[data-theme="dark"] body .profile-card,
html[data-theme="dark"] body .sidebar-card,
html[data-theme="dark"] body .auth-card,
html[data-theme="dark"] body .auth-box,
html[data-theme="dark"] body .auth-box-single,
html[data-theme="dark"] body .product-card,
html[data-theme="dark"] body .product-info,
html[data-theme="dark"] body .blog-card,
html[data-theme="dark"] body .post-card,
html[data-theme="dark"] body .dashboard-card,
html[data-theme="dark"] body .order-card,
html[data-theme="dark"] body .form-section,
html[data-theme="dark"] body .form-card,
html[data-theme="dark"] body .checkout-card,
html[data-theme="dark"] body .checkout-summary,
html[data-theme="dark"] body .product-result-card,
html[data-theme="dark"] body .payment-result-card,
html[data-theme="dark"] body .base-payment-summary,
html[data-theme="dark"] body .base-payment-card,
html[data-theme="dark"] body .plan-card,
html[data-theme="dark"] body .exercise-card,
html[data-theme="dark"] body .modal-content {
    background: var(--dm-surface) !important;
    color: var(--dm-text) !important;
    border-color: var(--dm-border) !important;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .32) !important;
}


/* Cart surfaces have highly-specific page styles. */

html[data-theme="dark"] body .shop-cart-page .cart-items-container,
html[data-theme="dark"] body .shop-cart-page .summary-card,
html[data-theme="dark"] body .shop-cart-page .trust-badges,
html[data-theme="dark"] body .shop-cart-page .empty-cart,
html[data-theme="dark"] body .shop-cart-page .cart-item {
    background: var(--dm-surface) !important;
    border-color: var(--dm-border) !important;
    color: var(--dm-text) !important;
}

html[data-theme="dark"] body .shop-cart-page .cart-actions,
html[data-theme="dark"] body .shop-cart-page .cart-item:hover,
html[data-theme="dark"] body .shop-cart-page .quantity-controls,
html[data-theme="dark"] body .shop-cart-page .trust-badge,
html[data-theme="dark"] body .shop-cart-page .product-image,
html[data-theme="dark"] body .shop-cart-page .summary-total {
    background: var(--dm-surface-2) !important;
    border-color: var(--dm-border) !important;
}

html[data-theme="dark"] body .shop-cart-page .product-name a,
html[data-theme="dark"] body .shop-cart-page .total-value {
    color: var(--dm-text) !important;
}


/* Form controls */

html[data-theme="dark"] body input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="dark"] body select,
html[data-theme="dark"] body textarea,
html[data-theme="dark"] body .form-control,
html[data-theme="dark"] body .checkout-card .checkout-fields input,
html[data-theme="dark"] body .checkout-card .checkout-fields textarea,
html[data-theme="dark"] body .password-input-wrapper .form-control {
    background: #1b2732 !important;
    color: var(--dm-text) !important;
    border-color: #455b6e !important;
    box-shadow: none !important;
}

html[data-theme="dark"] body input:focus,
html[data-theme="dark"] body select:focus,
html[data-theme="dark"] body textarea:focus,
html[data-theme="dark"] body .form-control:focus {
    background: #22323f !important;
    border-color: var(--dm-primary) !important;
    box-shadow: 0 0 0 4px rgba(105, 200, 190, .15) !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: #8798a5 !important;
    opacity: 1;
}

html[data-theme="dark"] select option {
    background: #22323f;
    color: var(--dm-text);
}


/* Typography within light-mode surfaces */

html[data-theme="dark"] body .profile-card :is(h1, h2, h3, h4, p, label, strong, span),
html[data-theme="dark"] body .sidebar-card :is(h1, h2, h3, h4, p, label, strong, span),
html[data-theme="dark"] body .auth-box-single :is(h1, h2, h3, h4, p, label, strong, span),
html[data-theme="dark"] body .checkout-card :is(h1, h2, h3, h4, p, label, strong, span),
html[data-theme="dark"] body .checkout-summary :is(h1, h2, h3, h4, p, label, strong, span),
html[data-theme="dark"] body .base-payment-summary :is(h1, h2, h3, h4, p, label, strong, span),
html[data-theme="dark"] body .base-payment-card :is(h1, h2, h3, h4, p, label, strong, span),
html[data-theme="dark"] body .payment-result-card :is(h1, h2, h3, h4, p, label, strong, span),
html[data-theme="dark"] body .product-result-card :is(h1, h2, h3, h4, p, label, strong, span) {
    color: var(--dm-text) !important;
}

html[data-theme="dark"] body .profile-email,
html[data-theme="dark"] body .form-hint,
html[data-theme="dark"] body .stat-label,
html[data-theme="dark"] body .product-description,
html[data-theme="dark"] body .base-payment-card-head p,
html[data-theme="dark"] body .base-payment-summary-head p {
    color: var(--dm-muted) !important;
}

html[data-theme="dark"] a {
    color: var(--dm-link);
}


/* Secondary inset surfaces */

html[data-theme="dark"] body .current-profile-image,
html[data-theme="dark"] body .stat-item,
html[data-theme="dark"] body .action-btn,
html[data-theme="dark"] body .setting-item,
html[data-theme="dark"] body .password-requirements,
html[data-theme="dark"] body .checkout-items>div,
html[data-theme="dark"] body .checkout-total,
html[data-theme="dark"] body .result-details,
html[data-theme="dark"] body .result-details>div,
html[data-theme="dark"] body .payment-result-details,
html[data-theme="dark"] body .payment-result-details>div,
html[data-theme="dark"] body .base-payment-customer,
html[data-theme="dark"] body .base-payment-price-box,
html[data-theme="dark"] body .base-payment-method-content,
html[data-theme="dark"] body .base-payment-invoice {
    background: var(--dm-surface-2) !important;
    color: var(--dm-text) !important;
    border-color: var(--dm-border) !important;
}


/* Tables */

html[data-theme="dark"] table,
html[data-theme="dark"] thead,
html[data-theme="dark"] tbody,
html[data-theme="dark"] tr,
html[data-theme="dark"] th,
html[data-theme="dark"] td {
    color: var(--dm-text) !important;
    border-color: var(--dm-border) !important;
}

html[data-theme="dark"] th {
    background: #1d2a35 !important;
}

html[data-theme="dark"] td {
    background: var(--dm-surface) !important;
}

html[data-theme="dark"] tr:hover td {
    background: var(--dm-surface-2) !important;
}


/* Feedback colors keep their meaning and contrast. */

html[data-theme="dark"] .alert-error,
html[data-theme="dark"] .checkout-alert,
html[data-theme="dark"] .payment-gateway-error {
    background: var(--dm-danger-bg) !important;
    color: var(--dm-danger) !important;
    border-color: #794047 !important;
}

html[data-theme="dark"] .alert-warning {
    background: var(--dm-warning-bg) !important;
    color: var(--dm-warning) !important;
}

html[data-theme="dark"] .alert-success,
html[data-theme="dark"] .base-payment-security {
    background: var(--dm-success-bg) !important;
    color: var(--dm-success) !important;
}


/* Footer */

html[data-theme="dark"] .footer {
    background: #111922 !important;
    border-color: var(--dm-border) !important;
}

html[data-theme="dark"] .footer p,
html[data-theme="dark"] .footer span,
html[data-theme="dark"] .footer a {
    color: var(--dm-muted) !important;
}

html[data-theme="dark"] .footer :is(h2, h3, h4),
html[data-theme="dark"] .footer .footer-title {
    color: var(--dm-text) !important;
}

html[data-theme="dark"] .footer p,
html[data-theme="dark"] .footer li,
html[data-theme="dark"] .footer .contact-label {
    color: #cbd4dc !important;
}

html[data-theme="dark"] .footer a {
    color: #8dd9d1 !important;
}

html[data-theme="dark"] .footer a:hover {
    color: #b9eee8 !important;
}

html[data-theme="dark"] .footer .contact-info> :not(.contact-label),
html[data-theme="dark"] .footer .footer-bottom p {
    color: #e7ebe8 !important;
}

html[data-theme="dark"] .footer .contact-icon,
html[data-theme="dark"] .footer-section h3 i {
    color: var(--dm-primary) !important;
}

html[data-theme="dark"] .footer-newsletter,
html[data-theme="dark"] .footer-bottom {
    border-color: #34495a !important;
}


/* A distinct graphite/sage identity for prominent dark-mode elements. */

html[data-theme="dark"] .page-header-unified,
html[data-theme="dark"] .products-page-header,
html[data-theme="dark"] .base-payment-header,
html[data-theme="dark"] .profile-header-bg {
    background: linear-gradient(135deg, #263846 0%, #34505a 58%, #76544e 100%) !important;
}

html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] .coach-btn.primary,
html[data-theme="dark"] .checkout-submit,
html[data-theme="dark"] .base-payment-submit,
html[data-theme="dark"] .shop-cart-page .btn-checkout {
    background: #f08a73 !important;
    color: #251f1d !important;
    border-color: transparent !important;
    box-shadow: 0 10px 25px rgba(240, 138, 115, .2) !important;
}

html[data-theme="dark"] .cart-table-header,
html[data-theme="dark"] .summary-header {
    background: #1d2a35 !important;
    color: var(--dm-text) !important;
}

html[data-theme="dark"] .badge-primary,
html[data-theme="dark"] .base-payment-step,
html[data-theme="dark"] .payment-result-kicker {
    background: #304a50 !important;
    color: #a9e5de !important;
}

html[data-theme="dark"] ::selection {
    background: #f08a73;
    color: #202a33;
}


/* Home page: coordinated petrol, coral and turquoise rather than black sections. */

html[data-theme="dark"] .coach-home,
html[data-theme="dark"] .coach-section,
html[data-theme="dark"] .knowledge-section {
    background: transparent !important;
    color: var(--dm-text) !important;
}

html[data-theme="dark"] .coach-hero {
    background: linear-gradient(120deg, #202f3b 0%, #304853 62%, #6b4d49 100%) !important;
}

html[data-theme="dark"] .coach-benefits,
html[data-theme="dark"] .bmi-section {
    background: var(--dm-bg-soft) !important;
}

html[data-theme="dark"] .stories-section {
    background: #202e39 !important;
}

html[data-theme="dark"] .mini-shop,
html[data-theme="dark"] .coach-final {
    background: linear-gradient(110deg, #263946, #35505a 65%, #78544d) !important;
}

html[data-theme="dark"] .mini-shop {
    background: var(--dm-bg) !important;
}

html[data-theme="dark"] .mini-shop-inner {
    background: linear-gradient(135deg, #263945, #2d424c) !important;
    color: var(--dm-text) !important;
    border-color: #465e6b !important;
    box-shadow: 0 14px 34px rgba(8, 14, 20, .2) !important;
}

html[data-theme="dark"] .mini-shop-icon {
    background: #3f3435 !important;
    color: #ff9b87 !important;
    border: 1px solid #684c4a !important;
}

html[data-theme="dark"] .mini-shop-inner>div>span {
    color: #ffac99 !important;
}

html[data-theme="dark"] .mini-shop-inner h2 {
    color: var(--dm-text) !important;
}

html[data-theme="dark"] .mini-shop-inner p {
    color: var(--dm-muted) !important;
}

html[data-theme="dark"] .mini-shop-inner .coach-btn.secondary {
    background: #ff8d76 !important;
    color: #271f1d !important;
    border-color: #ff8d76 !important;
    box-shadow: 0 9px 22px rgba(255, 123, 103, .2) !important;
}

html[data-theme="dark"] .mini-shop-inner .coach-btn.secondary:hover {
    background: #ffa28e !important;
    border-color: #ffa28e !important;
}

html[data-theme="dark"] .coach-home :is(h1, h2, h3, strong, b),
html[data-theme="dark"] .coach-home h3 a {
    color: var(--dm-text) !important;
}

html[data-theme="dark"] .coach-home p,
html[data-theme="dark"] .coach-home small,
html[data-theme="dark"] .coach-home .article-meta {
    color: var(--dm-muted) !important;
}

html[data-theme="dark"] .coach-steps article,
html[data-theme="dark"] .metric-card,
html[data-theme="dark"] .bmi-tool,
html[data-theme="dark"] .bmi-result,
html[data-theme="dark"] .story-grid blockquote,
html[data-theme="dark"] .knowledge-card,
html[data-theme="dark"] .empty-knowledge {
    background: var(--dm-surface) !important;
    color: var(--dm-text) !important;
    border-color: var(--dm-border) !important;
    box-shadow: 0 14px 34px rgba(8, 14, 20, .2) !important;
}

html[data-theme="dark"] .bmi-shell {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .bmi-tool {
    width: 100% !important;
    min-width: 0 !important;
    padding: 30px !important;
    background: #263641 !important;
}

html[data-theme="dark"] .bmi-fields label {
    color: var(--dm-text) !important;
}

html[data-theme="dark"] .bmi-fields label span,
html[data-theme="dark"] .bmi-legends,
html[data-theme="dark"] .bmi-result span,
html[data-theme="dark"] .bmi-score small {
    color: var(--dm-muted) !important;
}

html[data-theme="dark"] .bmi-fields input,
html[data-theme="dark"] .bmi-fields select {
    background: #1d2a34 !important;
    color: var(--dm-text) !important;
    border-color: #465d6b !important;
}

html[data-theme="dark"] .bmi-fields input:focus,
html[data-theme="dark"] .bmi-fields select:focus {
    background: #22323d !important;
    border-color: #78d7ca !important;
    box-shadow: 0 0 0 4px rgba(120, 215, 202, .12) !important;
}

html[data-theme="dark"] .bmi-result {
    background: #1f2e38 !important;
    border-color: #435966 !important;
}

html[data-theme="dark"] .bmi-score {
    border-color: #435966 !important;
}

html[data-theme="dark"] .bmi-score strong {
    color: #86ddd1 !important;
}

html[data-theme="dark"] .bmi-result.normal {
    background: #203a37 !important;
    border-color: #3b7066 !important;
}

html[data-theme="dark"] .bmi-result.medium {
    background: #40392a !important;
    border-color: #75643d !important;
}

html[data-theme="dark"] .bmi-result:is(.high, .invalid) {
    background: #442f31 !important;
    border-color: #795053 !important;
}

html[data-theme="dark"] .knowledge-image {
    background: #24343e !important;
    border-color: var(--dm-border) !important;
}

html[data-theme="dark"] .knowledge-image small {
    background: #314650 !important;
    color: #a9e5de !important;
    border: 1px solid #4b6670 !important;
}

html[data-theme="dark"] .story-grid blockquote,
html[data-theme="dark"] .knowledge-card,
html[data-theme="dark"] .coach-steps article,
html[data-theme="dark"] .empty-knowledge {
    background: #263641 !important;
    border-color: #405563 !important;
}

html[data-theme="dark"] .story-grid blockquote:hover,
html[data-theme="dark"] .knowledge-card:hover,
html[data-theme="dark"] .coach-steps article:hover {
    background: #2d414c !important;
}

@media (max-width: 620px) {
    html[data-theme="dark"] .bmi-tool {
        padding: 18px !important;
    }
}

html[data-theme="dark"] .coach-label,
html[data-theme="dark"] .coach-label.soft {
    background: #30494f !important;
    color: #a9e5de !important;
    border-color: #49686e !important;
}

html[data-theme="dark"] .coach-btn.secondary,
html[data-theme="dark"] .btn-secondary {
    background: #304553 !important;
    color: #f5fffc !important;
    border-color: #526b7d !important;
}

html[data-theme="dark"] .coach-btn.secondary:hover,
html[data-theme="dark"] .btn-secondary:hover {
    background: #3b5665 !important;
    border-color: #79e0d1 !important;
}


/* Product and article media remain lighter than cards without becoming white. */

html[data-theme="dark"] .product-image,
html[data-theme="dark"] .product-media,
html[data-theme="dark"] .knowledge-image,
html[data-theme="dark"] .blog-image {
    background: #d9e1df !important;
}


/* Consistent buttons and icon controls throughout inner pages. */

html[data-theme="dark"] button:not(.theme-toggle):not(.mobile-menu-toggle):not(.user-menu-toggle),
html[data-theme="dark"] .btn {
    border-color: var(--dm-border);
}

html[data-theme="dark"] .qty-btn,
html[data-theme="dark"] .password-toggle,
html[data-theme="dark"] .action-btn:hover {
    background: #35545b !important;
    color: #eafff9 !important;
}

html[data-theme="dark"] .btn-delete-image,
html[data-theme="dark"] .btn-remove {
    background: #4b3033 !important;
    color: #ffc0b8 !important;
    border-color: #8e5b5d !important;
}


/* Force every common card family onto the same two-level surface system. */

html[data-theme="dark"] body :is( .metric-card, .knowledge-card, .story-grid blockquote, .journey-card, .category-pills > a, .landing-product-card, .post-content, .product-details, .order-summary, .reservation-card, .notification-card, .workout-day, .exercise-item, .upload-card, .payment-card, .settings-card) {
    background: var(--dm-surface) !important;
    color: var(--dm-text) !important;
    border-color: var(--dm-border) !important;
}

html[data-theme="dark"] body :is( .metric-card, .knowledge-card, .story-grid blockquote, .journey-card, .product-card, .blog-card, .profile-card, .sidebar-card, .dashboard-card):hover {
    background: var(--dm-surface-2) !important;
    border-color: #587086 !important;
}

html[data-theme="dark"] body :is(.card-header, .profile-card .card-header, .checkout-card-head, .base-payment-card-head) {
    background: #202d38 !important;
    border-color: var(--dm-border) !important;
}


/* Keep accent usage predictable: coral for actions, teal for links/icons. */

html[data-theme="dark"] body :is(.card-title i, .form-label i, .setting-icon i, .coach-text-link, .read-link) {
    color: var(--dm-link) !important;
}

html[data-theme="dark"] body :is(.btn-primary, .coach-btn.primary):hover {
    background: #ff9d86 !important;
    color: #251f1d !important;
}


/* Hero artwork belongs to the dark palette: muted turquoise ink, not daylight navy. */

html[data-theme="dark"] .coach-hero-visual {
    background: radial-gradient(circle at 50% 48%, rgba(105, 200, 190, .18), transparent 63%) !important;
}

html[data-theme="dark"] .coach-hero-visual img {
    filter: brightness(0) saturate(100%) invert(75%) sepia(18%) saturate(930%) hue-rotate(124deg) brightness(91%) contrast(88%) drop-shadow(0 22px 24px rgba(9, 16, 22, .28)) !important;
    opacity: .94;
}


/* Products: page, filters, cards and image wells use the same slate family. */

html[data-theme="dark"] body .products-section,
html[data-theme="dark"] body .related-products-section {
    background: var(--dm-bg) !important;
}

html[data-theme="dark"] body :is(.products-filters-bar, .filter-card, .product-card-modern, .featured-card) {
    background: var(--dm-surface) !important;
    color: var(--dm-text) !important;
    border-color: var(--dm-border) !important;
    box-shadow: 0 12px 30px rgba(8, 14, 20, .16) !important;
}

html[data-theme="dark"] body :is(.product-card-image, .featured-image, .no-image-placeholder) {
    background: var(--dm-surface-2) !important;
    border-color: var(--dm-border) !important;
}

html[data-theme="dark"] body .product-card-image img {
    filter: drop-shadow(0 10px 14px rgba(5, 10, 15, .22));
}

html[data-theme="dark"] body :is(.product-card-info, .featured-info, .products-count, .sort-box label) {
    color: var(--dm-text) !important;
}

html[data-theme="dark"] body :is(.product-card-title a, .featured-info h4, .price-new) {
    color: var(--dm-text) !important;
}

html[data-theme="dark"] body :is(.product-category-tag, .product-rating, .price-old) {
    color: var(--dm-muted) !important;
}

html[data-theme="dark"] body .category-filter-item {
    background: transparent !important;
    color: var(--dm-muted) !important;
    border-color: transparent !important;
}

html[data-theme="dark"] body .category-filter-item:is(:hover, .active) {
    background: var(--dm-surface-2) !important;
    color: var(--dm-link) !important;
}


/* Workout areas: every hierarchy level uses the dark theme surfaces. */

html[data-theme="dark"] body :is(.user-workout-dashboard, .dashboard-content, .stats-dashboard, .plan-view-section) {
    background: var(--dm-bg) !important;
    color: var(--dm-text) !important;
}

html[data-theme="dark"] body :is( .dashboard-section, .notifications-section, .order-card, .plan-card, .stat-card, .dashboard-tabs, .plan-view-header, .expiry-card, .view-tabs, .workout-day-section, .nutrition-goals-card, .meal-card-view, .notes-card, .order-detail-container, .detail-section) {
    background: var(--dm-surface) !important;
    color: var(--dm-text) !important;
    border-color: var(--dm-border) !important;
    box-shadow: 0 12px 30px rgba(8, 14, 20, .16) !important;
}

html[data-theme="dark"] body :is( .order-card-header, .order-card-footer, .plan-card-header, .plan-card-footer, .day-header, .exercise-card-view, .exercise-details-view, .detail-item, .nutrition-item, .day-notes, .info-item, .info-full, .dashboard-tab) {
    background: var(--dm-surface-2) !important;
    color: var(--dm-text) !important;
    border-color: var(--dm-border) !important;
}

html[data-theme="dark"] body :is(.order-card-body, .plan-card-body, .day-body, .view-tab-content) {
    background: var(--dm-surface) !important;
    color: var(--dm-text) !important;
    border-color: var(--dm-border) !important;
}

html[data-theme="dark"] body :is( .order-card h4, .plan-card h4, .day-info h3, .exercise-info-view h4, .nutrition-value, .meal-content h4, .notes-card h3, .stat-number) {
    color: var(--dm-text) !important;
}

html[data-theme="dark"] body :is( .order-card p, .plan-card p, .detail-label, .exercise-muscle, .nutrition-label, .meal-content p, .notification-date) {
    color: var(--dm-muted) !important;
}

html[data-theme="dark"] body .user-workout-dashboard .order-person {
    background: var(--dm-surface-2) !important;
    color: var(--dm-text) !important;
    border-color: var(--dm-border) !important;
}

html[data-theme="dark"] body .user-workout-dashboard .order-person i {
    color: var(--dm-link) !important;
}

html[data-theme="dark"] body :is(.view-tab.active, .dashboard-tab.active) {
    background: #35505a !important;
    color: var(--dm-link) !important;
    border-color: #587086 !important;
}

html[data-theme="dark"] body :is(.day-icon, .exercise-number, .expiry-icon, .stat-icon) {
    background: #304a50 !important;
    color: var(--dm-link) !important;
}


/* Plan detail: cover the customer read-only cards introduced after the base theme. */

html[data-theme="dark"] body .plan-detail-dashboard {
    background: var(--dm-bg) !important;
    color: var(--dm-text) !important;
}

html[data-theme="dark"] body .plan-detail-dashboard :is( .plan-overview-card, .readonly-section-title, .plan-empty-state) {
    background: var(--dm-surface) !important;
    color: var(--dm-text) !important;
    border-color: var(--dm-border) !important;
    box-shadow: 0 12px 30px rgba(8, 14, 20, .16) !important;
}

html[data-theme="dark"] body .plan-detail-dashboard :is( .day-header, .day-body, .exercise-card-view, .detail-item, .nutrition-item, .meal-time-badge, .readonly-section-title > i) {
    background: var(--dm-surface-2) !important;
    color: var(--dm-text) !important;
    border-color: var(--dm-border) !important;
}

html[data-theme="dark"] body .plan-detail-dashboard :is( .plan-overview-card strong, .readonly-section-title h2, .plan-empty-state h3, .exercise-info-view h4, .meal-content h4, .nutrition-value, .notes-card h3, .detail-item strong) {
    color: var(--dm-text) !important;
}

html[data-theme="dark"] body .plan-detail-dashboard :is( .plan-overview-card span, .readonly-section-title p, .plan-empty-state p, .meal-content p, .notes-content, .nutrition-label, .detail-label) {
    color: var(--dm-muted) !important;
}

html[data-theme="dark"] body .plan-detail-dashboard :is( .plan-overview-card > i, .readonly-section-title > i, .meal-time-badge) {
    background: #304a50 !important;
    color: var(--dm-link) !important;
}


/* High-contrast breadcrumb bar; kept last to beat page-level breadcrumb rules. */

html[data-theme="dark"] body .breadcrumb-wrapper .breadcrumb-nav,
html[data-theme="dark"] body .base-payment-breadcrumb .base-payment-breadcrumb-nav {
    min-height: 48px !important;
    padding: 10px 16px !important;
    border: 1px solid #425966 !important;
    border-radius: 12px !important;
    background: #1d2b35 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    opacity: 1 !important;
}

html[data-theme="dark"] body .breadcrumb-wrapper .breadcrumb-nav a,
html[data-theme="dark"] body .base-payment-breadcrumb .base-payment-breadcrumb-nav a {
    color: #b9fff5 !important;
    font-weight: 800 !important;
    opacity: 1 !important;
}

html[data-theme="dark"] body .breadcrumb-wrapper .breadcrumb-nav span,
html[data-theme="dark"] body .base-payment-breadcrumb .base-payment-breadcrumb-nav span {
    color: #ffffff !important;
    font-weight: 800 !important;
    opacity: 1 !important;
}

html[data-theme="dark"] body .breadcrumb-wrapper .breadcrumb-nav a i {
    color: #7ee5d7 !important;
}

html[data-theme="dark"] body .breadcrumb-wrapper .breadcrumb-nav>i,
html[data-theme="dark"] body .base-payment-breadcrumb .base-payment-breadcrumb-nav>i {
    color: #a8bac3 !important;
    opacity: 1 !important;
}


/* The customer "My workout plans" block must never inherit a light section. */

html[data-theme="dark"] body .user-workout-dashboard {
    background: var(--dm-bg) !important;
}

html[data-theme="dark"] body .user-workout-dashboard .dashboard-section,
html[data-theme="dark"] body .user-workout-dashboard .plans-grid,
html[data-theme="dark"] body .user-workout-dashboard .orders-grid {
    background: var(--dm-surface) !important;
    color: var(--dm-text) !important;
    border-color: var(--dm-border) !important;
}

html[data-theme="dark"] body .user-workout-dashboard .dashboard-section>h3 {
    color: var(--dm-text) !important;
}

html[data-theme="dark"] body .user-workout-dashboard .dashboard-section>h3 i {
    color: var(--dm-link) !important;
}

html[data-theme="dark"] body .user-workout-dashboard .plan-card,
html[data-theme="dark"] body .user-workout-dashboard .order-card {
    background: var(--dm-surface-2) !important;
    border: 1px solid var(--dm-border) !important;
}

html[data-theme="dark"] body section.user-workout-dashboard div.dashboard-section.workout-plans-section {
    background-color: var(--dm-surface) !important;
    background-image: none !important;
    color: var(--dm-text) !important;
    border: 1px solid var(--dm-border) !important;
    box-shadow: 0 12px 30px rgba(8, 14, 20, .16) !important;
}

html[data-theme="dark"] body section.user-workout-dashboard div.dashboard-section.workout-plans-section .plans-grid {
    background: transparent !important;
}

html[data-theme="dark"] body section.user-workout-dashboard div.dashboard-section.workout-plans-section :is(.plan-card, .empty-state) {
    background-color: var(--dm-surface-2) !important;
    background-image: none !important;
    color: var(--dm-text) !important;
    border-color: var(--dm-border) !important;
}

html[data-theme="dark"] body .user-workout-dashboard .plan-payment-summary {
    background: #202d38 !important;
    border-color: var(--dm-border) !important;
}

html[data-theme="dark"] body .user-workout-dashboard :is(.plan-payment-price, .plan-payment-duration) {
    background: var(--dm-surface) !important;
}

html[data-theme="dark"] body .user-workout-dashboard .plan-payment-price strong,
html[data-theme="dark"] body .user-workout-dashboard .plan-payment-duration strong {
    color: var(--dm-text) !important;
}

html[data-theme="dark"] body .user-workout-dashboard .plan-payment-summary>p {
    background: var(--dm-warning-bg) !important;
    color: var(--dm-warning) !important;
}

html[data-theme="dark"] body .user-workout-dashboard :is(.plan-price-pending, .plan-payment-disabled) {
    background: var(--dm-warning-bg) !important;
    color: var(--dm-warning) !important;
    border-color: #786640 !important;
}

html[data-theme="dark"] body .user-workout-dashboard .plan-price-pending strong {
    color: var(--dm-warning) !important;
}


/* Create-order page: replace every light form surface with the shared dark palette. */

html[data-theme="dark"] body .order-form-section {
    background: var(--dm-bg) !important;
    color: var(--dm-text) !important;
}

html[data-theme="dark"] body :is( .order-info-card, .order-price-card, .order-form-main, .order-steps-progress, .order-security-badges) {
    background: var(--dm-surface) !important;
    background-image: none !important;
    color: var(--dm-text) !important;
    border-color: var(--dm-border) !important;
    box-shadow: 0 12px 30px rgba(8, 14, 20, .16) !important;
}

html[data-theme="dark"] body .order-workout-form .order-form-section.order-step {
    background: var(--dm-surface) !important;
    background-image: none !important;
    color: var(--dm-text) !important;
    border-color: var(--dm-border) !important;
}

html[data-theme="dark"] body :is(.order-info-header h3, .order-section-title, .order-form-label) {
    color: var(--dm-text) !important;
}

html[data-theme="dark"] body :is( .order-benefits-list li, .order-price-features li, .order-form-hint, .order-step-dot-label, .order-form-note) {
    color: var(--dm-muted) !important;
}

html[data-theme="dark"] body :is(.order-info-header i, .order-security-item i, .order-section-title i) {
    background: #304a50 !important;
    color: var(--dm-link) !important;
}

html[data-theme="dark"] body .order-price-badge {
    background: #49363a !important;
    color: #ffc0b4 !important;
}

html[data-theme="dark"] body .order-price-amount strong {
    background: none !important;
    color: var(--dm-primary) !important;
    -webkit-text-fill-color: currentColor !important;
}

html[data-theme="dark"] body .order-step-track {
    background: #1b2732 !important;
}

html[data-theme="dark"] body .order-step-track-fill {
    background: var(--dm-primary) !important;
}

html[data-theme="dark"] body .order-step-dot-num {
    background: var(--dm-surface-2) !important;
    color: var(--dm-muted) !important;
    border-color: var(--dm-border) !important;
}

html[data-theme="dark"] body .order-step-dot.active .order-step-dot-num {
    background: var(--dm-primary) !important;
    color: #251f1d !important;
    border-color: var(--dm-primary) !important;
}

html[data-theme="dark"] body .order-step-dot.completed .order-step-dot-num {
    background: var(--dm-link) !important;
    color: #17212b !important;
}

html[data-theme="dark"] body .order-form-control {
    background: #1b2732 !important;
    color: var(--dm-text) !important;
    border-color: #455b6e !important;
}

html[data-theme="dark"] body .order-form-control:focus {
    background: #22323f !important;
    border-color: var(--dm-link) !important;
    box-shadow: 0 0 0 4px rgba(105, 200, 190, .15) !important;
}

html[data-theme="dark"] body .order-radio-content {
    background: var(--dm-surface-2) !important;
    background-image: none !important;
    color: var(--dm-text) !important;
    border-color: var(--dm-border) !important;
}

html[data-theme="dark"] body .order-radio-content :is(h4, p) {
    color: var(--dm-text) !important;
}

html[data-theme="dark"] body .order-radio-content p {
    color: var(--dm-muted) !important;
}

html[data-theme="dark"] body .order-radio-content i {
    background: #304a50 !important;
    color: var(--dm-link) !important;
}

html[data-theme="dark"] body .order-radio-card input:checked+.order-radio-content {
    background: #304553 !important;
    border-color: var(--dm-link) !important;
    box-shadow: 0 0 0 3px rgba(105, 200, 190, .13) !important;
}

html[data-theme="dark"] body .order-checkbox-label {
    background: var(--dm-surface-2) !important;
    color: var(--dm-text) !important;
    border-color: var(--dm-border) !important;
}

html[data-theme="dark"] body .order-btn-prev {
    background: #304553 !important;
    color: var(--dm-text) !important;
    border-color: #526b7d !important;
}

html[data-theme="dark"] body :is(.order-btn-next, .order-submit-btn) {
    background: var(--dm-primary) !important;
    color: #251f1d !important;
    border-color: var(--dm-primary) !important;
}


/* Store product cards: one coherent dark surface from image to actions. */

html[data-theme="dark"] body .products-main .product-card-modern {
    background: var(--dm-surface) !important;
    background-image: none !important;
    color: var(--dm-text) !important;
    border: 1px solid var(--dm-border) !important;
    box-shadow: 0 12px 28px rgba(8, 14, 20, .18) !important;
}

html[data-theme="dark"] body .products-main .product-card-modern:hover {
    background: var(--dm-surface-2) !important;
    border-color: #587086 !important;
    box-shadow: 0 18px 36px rgba(8, 14, 20, .25) !important;
}

html[data-theme="dark"] body .products-main .product-card-image {
    background: #2b3b49 !important;
    background-image: linear-gradient(145deg, #2b3b49, #314451) !important;
    border-bottom: 1px solid var(--dm-border) !important;
}

html[data-theme="dark"] body .products-main .product-card-info {
    background: transparent !important;
    color: var(--dm-text) !important;
}

html[data-theme="dark"] body .products-main .product-category-tag {
    background: #304a50 !important;
    color: var(--dm-link) !important;
    border: 1px solid #47636a !important;
}

html[data-theme="dark"] body .products-main .product-card-title a {
    color: var(--dm-text) !important;
}

html[data-theme="dark"] body .products-main .product-card-modern:hover .product-card-title a {
    color: #8ed9d0 !important;
}

html[data-theme="dark"] body .products-main .product-rating i {
    color: var(--dm-warning) !important;
}

html[data-theme="dark"] body .products-main .rating-text {
    color: var(--dm-muted) !important;
}

html[data-theme="dark"] body .products-main .stock-available {
    background: var(--dm-success-bg) !important;
    color: var(--dm-success) !important;
}

html[data-theme="dark"] body .products-main .stock-unavailable {
    background: var(--dm-danger-bg) !important;
    color: var(--dm-danger) !important;
}

html[data-theme="dark"] body .products-main .product-card-price {
    background: #202d38 !important;
    color: var(--dm-text) !important;
    border: 1px solid var(--dm-border) !important;
}

html[data-theme="dark"] body .products-main .price-current {
    color: var(--dm-text) !important;
}

html[data-theme="dark"] body .products-main .price-currency,
html[data-theme="dark"] body .products-main .price-old {
    color: var(--dm-muted) !important;
}

html[data-theme="dark"] body .products-main .price-discount,
html[data-theme="dark"] body .products-main .badge-discount {
    background: #49363a !important;
    color: #ffc0b4 !important;
}

html[data-theme="dark"] body .products-main .badge-featured {
    background: #453b2b !important;
    color: var(--dm-warning) !important;
}

html[data-theme="dark"] body .products-main .btn-add-to-cart-list {
    background: var(--dm-primary) !important;
    color: #251f1d !important;
    border: 1px solid var(--dm-primary) !important;
}

html[data-theme="dark"] body .products-main .btn-add-to-cart-list:hover {
    background: #ff9d86 !important;
}

html[data-theme="dark"] body .products-main .btn-view-details {
    background: #304553 !important;
    color: var(--dm-link) !important;
    border-color: #526b7d !important;
}

html[data-theme="dark"] body .products-main .btn-out-of-stock {
    background: #293642 !important;
    color: var(--dm-muted) !important;
}

html[data-theme="dark"] body .featured-product-item {
    background: var(--dm-surface-2) !important;
    color: var(--dm-text) !important;
    border-color: transparent !important;
}

html[data-theme="dark"] body .featured-product-item:hover {
    background: #304553 !important;
    border-color: #587086 !important;
}

html[data-theme="dark"] body .featured-image {
    background: #2b3b49 !important;
}

html[data-theme="dark"] body .body-photo-card {
    background: var(--dm-surface-2) !important;
    border-color: var(--dm-border) !important;
}

html[data-theme="dark"] body .body-photo-guide {
    background: #202d38 !important;
    color: var(--dm-link) !important;
}

html[data-theme="dark"] body .body-photo-guide b {
    color: var(--dm-text) !important;
}

html[data-theme="dark"] body .body-photo-guide small {
    color: var(--dm-muted) !important;
}

html[data-theme="dark"] body .body-photo-picker {
    background: #304553 !important;
    color: var(--dm-link) !important;
}

html[data-theme="dark"] body .body-photo-preview {
    background: #202d38 !important;
}


/* Trainer area: use the same compact page header as customer-facing pages. */

body .main-content .cplan-page-header,
body .main-content .exercises-page-header {
    min-height: 128px !important;
    padding: 1.65rem 0 !important;
    margin-bottom: 1.6rem !important;
}

body .main-content .cplan-page-header .page-header-content,
body .main-content .exercises-page-header .page-header-content {
    min-height: 76px !important;
}

body .main-content .cplan-page-header .cplan-header-title {
    font-size: clamp(1.55rem, 2.8vw, 2.25rem) !important;
    line-height: 1.25 !important;
    margin: 0 0 .35rem !important;
}

body .main-content .cplan-page-header .cplan-header-subtitle {
    font-size: .8rem !important;
    line-height: 1.7 !important;
    margin: 0 !important;
}


/* Trainer light theme: deliberately scoped so it never inherits the dark palette. */

html[data-theme="light"] body.trainer-user :is(.stats-dashboard, .dashboard-content, .trainer-exercises-page, .cplan-section) {
    background: linear-gradient(180deg, #f4faf8 0%, #fffaf2 100%) !important;
    color: #17324d !important;
}

html[data-theme="light"] body.trainer-user :is(.stats-dashboard .stat-card, .dashboard-content .dashboard-section, .dashboard-content .dashboard-tabs, .dashboard-content .order-card, .dashboard-content .plan-card, .dashboard-content .empty-state, .trainer-exercises-page .library-toolbar, .trainer-exercises-page .library-exercise-card, .trainer-exercises-page .library-empty-state, .cplan-user-card, .cplan-exercises-card, .cplan-workout-section, .cplan-nutrition-section) {
    background: #ffffff !important;
    background-image: none !important;
    color: #17324d !important;
    border-color: #dce9e6 !important;
    box-shadow: 0 12px 32px rgba(23, 107, 135, .09) !important;
}

html[data-theme="light"] body.trainer-user :is(.dashboard-content .order-card-header, .dashboard-content .order-card-footer, .dashboard-content .plan-card-header, .dashboard-content .plan-card-footer, .trainer-exercises-page .exercise-visual, .cplan-card-header, .cplan-section-header, .cplan-day-header, .cplan-meal-header, .cplan-exercises-zone) {
    background: #f0f8f6 !important;
    background-image: none !important;
    color: #17324d !important;
    border-color: #dce9e6 !important;
}

html[data-theme="light"] body.trainer-user :is(.stats-dashboard h2, .stats-dashboard h3, .dashboard-content h2, .dashboard-content h3, .dashboard-content h4, .trainer-exercises-page h2, .trainer-exercises-page h3, .cplan-section h2, .cplan-section h3, .cplan-section h4, .cplan-label) {
    color: #17324d !important;
}

html[data-theme="light"] body.trainer-user :is(.dashboard-content p, .dashboard-content .info-item, .dashboard-content .info-row, .trainer-exercises-page p, .trainer-exercises-page .results-summary, .cplan-section p, .cplan-section small) {
    color: #607680 !important;
}

html[data-theme="light"] body.trainer-user .cplan-section :is(.cplan-search-input, .cplan-input, .cplan-select, .cplan-textarea),
html[data-theme="light"] body.trainer-user .trainer-exercises-page .search-box input {
    background: #fbfefd !important;
    color: #17324d !important;
    border-color: #cfe2df !important;
}

html[data-theme="light"] body.trainer-user .cplan-section :is(.cplan-exercise-item, .cplan-day-card, .cplan-meal-card, .cplan-target-item, .cplan-targets-wrapper, .cplan-notes-wrapper) {
    background: #f7fbfa !important;
    background-image: none !important;
    color: #17324d !important;
    border-color: #dce9e6 !important;
}

html[data-theme="light"] body.trainer-user .trainer-logout-link {
    min-height: 44px !important;
    padding: .65rem 1.15rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .55rem !important;
    border: 1px solid #e66554 !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #ff7b67, #f06452) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 20px rgba(240, 100, 82, .24) !important;
    font-weight: 800 !important;
}

html[data-theme="light"] body.trainer-user .trainer-logout-link:hover {
    background: linear-gradient(135deg, #f36a56, #dc5544) !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 11px 24px rgba(220, 85, 68, .3) !important;
}

html[data-theme="dark"] body.trainer-user .trainer-logout-link {
    min-height: 44px !important;
    padding: .65rem 1.15rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .55rem !important;
    border: 1px solid #ff7b67 !important;
    border-radius: 12px !important;
    background: rgba(255, 123, 103, .1) !important;
    color: #ffc2ba !important;
    box-shadow: inset 0 0 0 1px rgba(255, 123, 103, .08), 0 8px 20px rgba(0, 0, 0, .18) !important;
    font-weight: 800 !important;
}

html[data-theme="dark"] body.trainer-user .trainer-logout-link:hover {
    border-color: #ff9a88 !important;
    background: linear-gradient(135deg, #e86655, #c94f42) !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 11px 25px rgba(201, 79, 66, .28) !important;
}


/* Trainer dashboard */

html[data-theme="dark"] body :is(.stats-dashboard, .dashboard-content, .trainer-exercises-page, .cplan-section) {
    background: var(--dm-bg) !important;
    background-image: none !important;
    color: var(--dm-text) !important;
}

html[data-theme="dark"] body :is(.stats-dashboard .stat-card, .dashboard-content .dashboard-section, .dashboard-content .dashboard-tabs, .dashboard-content .order-card, .dashboard-content .plan-card, .dashboard-content .empty-state) {
    background: var(--dm-surface) !important;
    background-image: none !important;
    color: var(--dm-text) !important;
    border-color: var(--dm-border) !important;
    box-shadow: 0 12px 28px rgba(8, 14, 20, .2) !important;
}

html[data-theme="dark"] body .stats-dashboard .stat-card::before,
html[data-theme="dark"] body .dashboard-content :is(.order-card, .plan-card)::before {
    opacity: .8 !important;
}

html[data-theme="dark"] body .stats-dashboard .stat-icon {
    background: var(--dm-surface-2) !important;
    color: var(--dm-link) !important;
}

html[data-theme="dark"] body .stats-dashboard :is(.stat-number, .stat-label),
html[data-theme="dark"] body .dashboard-content :is(h2, h3, h4, .order-number, .info-item strong, .info-row strong) {
    color: var(--dm-text) !important;
}

html[data-theme="dark"] body .stats-dashboard .stat-label,
html[data-theme="dark"] body .dashboard-content :is(p, .info-item, .info-row, .plan-info, .order-notes) {
    color: var(--dm-muted) !important;
}

html[data-theme="dark"] body .dashboard-content :is(.order-card-header, .order-card-footer, .plan-card-header, .plan-card-footer, .section-header-inline) {
    background: var(--dm-surface-2) !important;
    border-color: var(--dm-border) !important;
}

html[data-theme="dark"] body.trainer-user .dashboard-content .plan-card.draft-card {
    background: #112d3f!important;
    border-color: #27546a!important;
}

html[data-theme="dark"] body.trainer-user .dashboard-content .plan-card.draft-card .plan-card-header,
html[data-theme="dark"] body.trainer-user .dashboard-content .plan-card.draft-card .plan-card-footer {
    background: #16384c!important;
    border-color: #27546a!important;
}

html[data-theme="dark"] body.trainer-user .dashboard-content .plan-card.active-card {
    background: #12372f!important;
    border-color: #287664!important;
}

html[data-theme="dark"] body.trainer-user .dashboard-content .plan-card.active-card .plan-card-header,
html[data-theme="dark"] body.trainer-user .dashboard-content .plan-card.active-card .plan-card-footer {
    background: #17463c!important;
    border-color: #287664!important;
}

html[data-theme="dark"] body.trainer-user .dashboard-content .plan-card.completed-card {
    background: #3a2e19!important;
    border-color: #8c6d2c!important;
}

html[data-theme="dark"] body.trainer-user .dashboard-content .plan-card.completed-card .plan-card-header,
html[data-theme="dark"] body.trainer-user .dashboard-content .plan-card.completed-card .plan-card-footer {
    background: #493a1f!important;
    border-color: #8c6d2c!important;
}

html[data-theme="dark"] body.trainer-user .dashboard-content .plan-card :is(.info-row, .info-item) {
    background: rgba(255, 255, 255, .055)!important;
    border-color: rgba(255, 255, 255, .12)!important;
    color: #d8e5e7!important;
}

html[data-theme="dark"] body.trainer-user .dashboard-content .plan-card :is(.info-row, .info-item) i {
    color: #77d9cf!important;
}

html[data-theme="dark"] body .dashboard-content .dashboard-tab {
    background: transparent !important;
    color: var(--dm-muted) !important;
    border-color: transparent !important;
}

html[data-theme="dark"] body .dashboard-content .dashboard-tab:hover,
html[data-theme="dark"] body .dashboard-content .dashboard-tab.active {
    background: #304553 !important;
    color: var(--dm-link) !important;
    border-color: #526b7d !important;
}

html[data-theme="dark"] body :is(.header-action-btn, .btn-create-plan, .dashboard-content .btn-edit) {
    background: var(--dm-primary) !important;
    color: #251f1d !important;
    border-color: var(--dm-primary) !important;
}

html[data-theme="dark"] body :is(.dashboard-content .btn-view, .back-button, .back-to-dashboard) {
    background: #304553 !important;
    color: var(--dm-link) !important;
    border-color: #526b7d !important;
}


/* Trainer exercise library */

html[data-theme="dark"] body .trainer-exercises-page :is(.library-toolbar, .library-exercise-card, .library-empty-state) {
    background: var(--dm-surface) !important;
    background-image: none !important;
    color: var(--dm-text) !important;
    border-color: var(--dm-border) !important;
    box-shadow: 0 12px 28px rgba(8, 14, 20, .2) !important;
}

html[data-theme="dark"] body .trainer-exercises-page :is(.exercise-visual, .exercise-card-actions, .results-summary) {
    background: var(--dm-surface-2) !important;
    border-color: var(--dm-border) !important;
}

html[data-theme="dark"] body .trainer-exercises-page :is(h2, h3, .library-toolbar-heading, .exercise-group) {
    color: var(--dm-text) !important;
}

html[data-theme="dark"] body .trainer-exercises-page :is(p, .muted-description, .no-video) {
    color: var(--dm-muted) !important;
}

html[data-theme="dark"] body .trainer-exercises-page .search-box input {
    background: #202d38 !important;
    color: var(--dm-text) !important;
    border-color: var(--dm-border) !important;
}

html[data-theme="dark"] body .trainer-exercises-page .group-filter {
    background: var(--dm-surface-2) !important;
    color: var(--dm-muted) !important;
    border-color: var(--dm-border) !important;
}

html[data-theme="dark"] body .trainer-exercises-page .group-filter:is(:hover, .is-active) {
    background: #304a50 !important;
    color: var(--dm-link) !important;
    border-color: #47636a !important;
}


/* Create-plan editor */

html[data-theme="dark"] body .cplan-breadcrumb-wrapper {
    background: var(--dm-bg-soft) !important;
}

html[data-theme="dark"] body .cplan-section :is(.cplan-user-card, .cplan-exercises-card, .cplan-workout-section, .cplan-nutrition-section) {
    background: var(--dm-surface) !important;
    background-image: none !important;
    color: var(--dm-text) !important;
    border-color: var(--dm-border) !important;
    box-shadow: 0 12px 28px rgba(8, 14, 20, .2) !important;
}

html[data-theme="dark"] body .cplan-section :is(.cplan-card-header, .cplan-section-header, .cplan-actions) {
    background: var(--dm-surface-2) !important;
    background-image: none !important;
    border-color: var(--dm-border) !important;
}

html[data-theme="dark"] body .cplan-section :is(.cplan-exercise-item, .cplan-day-card, .cplan-meal-card, .cplan-target-item, .cplan-targets-wrapper, .cplan-notes-wrapper) {
    background: #202d38 !important;
    background-image: none !important;
    color: var(--dm-text) !important;
    border-color: var(--dm-border) !important;
}

html[data-theme="dark"] body .cplan-section :is(.cplan-day-header, .cplan-meal-header, .cplan-exercises-zone) {
    background: var(--dm-surface-2) !important;
    background-image: none !important;
    border-color: var(--dm-border) !important;
}

html[data-theme="dark"] body .cplan-section :is(.cplan-header-icon, .cplan-thumb-placeholder, .cplan-target-icon, .cplan-meal-icon, .cplan-exercise-icon) {
    background: #304a50 !important;
    color: var(--dm-link) !important;
}

html[data-theme="dark"] body .cplan-section :is(.cplan-search-input, .cplan-input, .cplan-select, .cplan-textarea) {
    background: #17232e !important;
    color: var(--dm-text) !important;
    border-color: var(--dm-border) !important;
}

html[data-theme="dark"] body .cplan-section :is(.cplan-search-input, .cplan-input, .cplan-select, .cplan-textarea):focus {
    border-color: var(--dm-link) !important;
    box-shadow: 0 0 0 3px rgba(105, 200, 190, .15) !important;
}

html[data-theme="dark"] body .cplan-section :is(h2, h3, h4, .cplan-label, .cplan-row-info strong, .cplan-exercise-info strong, .cplan-targets-title) {
    color: var(--dm-text) !important;
}

html[data-theme="dark"] body .cplan-section :is(p, small, .cplan-row-info, .cplan-exercise-info, .cplan-zone-hint) {
    color: var(--dm-muted) !important;
}

html[data-theme="dark"] body .cplan-section .cplan-muscle-tab {
    background: var(--dm-surface-2) !important;
    color: var(--dm-muted) !important;
    border-color: var(--dm-border) !important;
}

html[data-theme="dark"] body .cplan-section .cplan-muscle-tab:is(:hover, .cplan-tab-active) {
    background: #304a50 !important;
    color: var(--dm-link) !important;
    border-color: #47636a !important;
}

html[data-theme="dark"] body .cplan-section .cplan-btn-secondary {
    background: #304553 !important;
    color: var(--dm-link) !important;
    border-color: #526b7d !important;
}

@media (max-width: 900px) {
    .navbar {
        height: 72px !important;
    }
    body {
        padding-top: 72px !important;
    }
    .brand-logo-frame {
        width: 52px;
        height: 52px;
    }
    html[data-theme="dark"] .navbar-menu {
        background: #1c2833 !important;
    }
}

@media(max-width:768px) {
    html[data-theme="dark"] .mobile-bottom-nav,
    html[data-theme="dark"] .mobile-nav-sheet {
        background: rgba(15, 30, 39, .94);
        border-color: #324b55;
        box-shadow: 0 16px 44px rgba(0, 0, 0, .42)
    }
    html[data-theme="dark"] .mobile-bottom-link {
        color: #9fb3bb
    }
    html[data-theme="dark"] .mobile-bottom-link i {
        color: #b2c5cb
    }
    html[data-theme="dark"] .mobile-bottom-link.active,
    html[data-theme="dark"] .mobile-bottom-link.sheet-open {
        color: #73e6df;
        background: rgba(42, 191, 183, .12)
    }
    html[data-theme="dark"] .mobile-bottom-link.active i,
    html[data-theme="dark"] .mobile-bottom-link.sheet-open i {
        color: #73e6df
    }
    html[data-theme="dark"] .mobile-sheet-heading {
        border-color: #304850
    }
    html[data-theme="dark"] .mobile-sheet-heading strong {
        color: #f1f7f8
    }
    html[data-theme="dark"] .mobile-sheet-heading span {
        color: #9db0b7
    }
    html[data-theme="dark"] .mobile-sheet-handle {
        background: #48616a
    }
    html[data-theme="dark"] .mobile-sheet-close,
    html[data-theme="dark"] .mobile-sheet-links a,
    html[data-theme="dark"] .mobile-sheet-links button {
        background: #162b35;
        border-color: #324a53;
        color: #e9f2f4
    }
    html[data-theme="dark"] .mobile-sheet-links i {
        background: #10252e;
        border-color: #2f5d62;
        color: #72ded7
    }
    html[data-theme="dark"] .mobile-sheet-section-title {
        color: #a8bbc1
    }
    html[data-theme="dark"] .mobile-sheet-section-title::after {
        background: #304850
    }
    html[data-theme="dark"] .mobile-sheet-section-title i {
        color: #ffad55;
        background: transparent;
        border: 0
    }
    html[data-theme="dark"] .mobile-sheet-links .mobile-blog-link.active {
        background: rgba(52, 182, 174, .12);
        border-color: #39776f;
        color: #80e4dd;
        box-shadow: inset 0 -2px 0 #46c7be
    }
    html[data-theme="dark"] .mobile-blog-empty {
        border-color: #3b535c;
        color: #9db0b7
    }
}

@media(max-width:768px) {
    .navbar {
        height: 82px!important
    }
    body {
        padding-top: 82px!important
    }
    .navbar-container {
        position: relative;
        justify-content: center!important
    }
    .navbar-brand {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        margin: 0!important
    }
    .brand-logo-frame {
        width: 180px;
        height: 70px
    }
    .brand-logo {
        top: -18px;
        left: -5px;
        width: 190px
    }
}


/* The current Body Beauty logo is a wide transparent asset; never crop it with offsets. */

.navbar-brand .brand-logo-frame {
    width: 200px!important;
    height: 70px!important;
    display: grid!important;
    place-items: center!important;
    overflow: visible!important
}

.navbar-brand .brand-logo {
    position: static!important;
    display: block!important;
    width: 100%!important;
    height: 100%!important;
    max-width: 100%!important;
    object-fit: contain!important;
    object-position: center!important;
    transform: none!important
}

@media(max-width:768px) {
    .navbar-brand .brand-logo-frame {
        width: 150px!important;
        height: 76px!important
    }
    .navbar-brand .brand-logo {
        width: 100%!important;
        height: 100%!important
    }
}
