:root {
    color-scheme: light;
    --theme-warning: #EB7A63;
    --app-page-surface: #f4f4f4;
    --app-surface: #fff;
    --app-surface-raised: #fff;
    --app-surface-muted: #f8f8f8;
    --app-text: #2b2b2b;
    --app-text-muted: #59667a;
    --app-text-disabled: #898989;
    --app-border: #efefef;
    --app-control-border: #cccccc;
    --app-hover: #FCE9E4;
    --admin-shell-surface: var(--app-surface);
    --admin-shell-border: var(--app-border);
    --admin-shell-text: var(--app-text);
    --admin-shell-muted: var(--app-text-muted);
    --admin-shell-header-icon-color: var(--app-text);
}

html[data-theme="dark"] {
    color-scheme: dark;
    --app-page-surface: #1d1e26;
    --app-surface: #262932;
    --app-surface-raised: #323846;
    --app-surface-muted: #2b2b2b;
    --app-text: #f4f4f4;
    --app-text-muted: #cccccc;
    --app-text-disabled: #999999;
    --app-border: #59667a;
    --app-control-border: #898989;
    --app-hover: #323846;
    --admin-shell-surface: var(--app-surface);
    --admin-shell-border: var(--app-border);
    --admin-shell-text: var(--app-text);
    --admin-shell-muted: var(--app-text-muted);
    --admin-shell-header-icon-color: var(--app-text);
}

/* ── Theme toggle button ──────────────────────────────────── */
.app-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--app-border);
    border-radius: 6px;
    background: var(--app-surface);
    color: var(--app-text-muted);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
    position: relative;
}

.app-theme-toggle:hover {
    border-color: var(--theme-deafult, #E35336);
    background: var(--theme-deafult, #E35336);
    color: #fff;
}

.app-theme-toggle:focus-visible {
    outline: 2px solid var(--theme-deafult, #E35336);
    outline-offset: 2px;
}

/* Icon visibility: show only the icon matching current preference */
.app-theme-icon { display: none; pointer-events: none; }

#appThemeToggle[data-preference="light"]  .app-theme-icon--light,
#appThemeToggle[data-preference="dark"]   .app-theme-icon--dark,
#appThemeToggle[data-preference="system"] .app-theme-icon--system {
    display: block;
}

/* Fallback before JS sets data-preference */
#appThemeToggle:not([data-preference]) .app-theme-icon--light {
    display: block;
}

html[data-theme="dark"] body,
html[data-theme="dark"] body .page-wrapper,
html[data-theme="dark"] body .page-body-wrapper,
html[data-theme="dark"] body .page-body,
html[data-theme="dark"] body .footer {
    background-color: var(--app-page-surface) !important;
    color: var(--app-text);
}

html[data-theme="dark"] body .page-header,
html[data-theme="dark"] body .header-wrapper,
html[data-theme="dark"] body .sidebar-wrapper,
html[data-theme="dark"] body .sidebar-main,
html[data-theme="dark"] body .score-module-sidebar,
html[data-theme="dark"] body .app-sidebar-brand,
html[data-theme="dark"] body .card,
html[data-theme="dark"] body .card-header,
html[data-theme="dark"] body .card-body,
html[data-theme="dark"] body .card-footer,
html[data-theme="dark"] body .modal-content,
html[data-theme="dark"] body .dropdown-menu,
html[data-theme="dark"] body .popover,
html[data-theme="dark"] body .app-header-panel,
html[data-theme="dark"] body .app-account-menu-dropdown,
html[data-theme="dark"] body .score-module-sidebar .score-module-group,
html[data-theme="dark"] body .score-module-sidebar .score-module-link {
    background-color: var(--app-surface) !important;
    color: var(--app-text);
}

html[data-theme="dark"] body .score-module-sidebar .score-module-link:hover,
html[data-theme="dark"] body .app-account-menu-dropdown a:hover,
html[data-theme="dark"] body .dropdown-menu > li > a:hover,
html[data-theme="dark"] body .dropdown-menu > li > a:focus,
html[data-theme="dark"] body .list-group-item-action:hover,
html[data-theme="dark"] body .table-hover tbody tr:hover,
html[data-theme="dark"] body .nav-tabs .nav-link:hover {
    background-color: var(--app-hover) !important;
    color: var(--app-text) !important;
}

html[data-theme="dark"] body .sidebar-wrapper .sidebar-main .sidebar-links > li > a,
html[data-theme="dark"] body .sidebar-wrapper .sidebar-main .sidebar-links .sidebar-submenu a,
html[data-theme="dark"] body .score-module-sidebar a,
html[data-theme="dark"] body .header-wrapper,
html[data-theme="dark"] body .header-wrapper .nav-link,
html[data-theme="dark"] body .profile-nav,
html[data-theme="dark"] body .card-title,
html[data-theme="dark"] body .card h1,
html[data-theme="dark"] body .card h2,
html[data-theme="dark"] body .card h3,
html[data-theme="dark"] body .card h4,
html[data-theme="dark"] body .card h5,
html[data-theme="dark"] body .card h6,
html[data-theme="dark"] body label,
html[data-theme="dark"] body .modal-title,
html[data-theme="dark"] body .dropdown-menu,
html[data-theme="dark"] body .text-dark {
    color: var(--app-text) !important;
}

html[data-theme="dark"] body .text-muted,
html[data-theme="dark"] body small,
html[data-theme="dark"] body .small,
html[data-theme="dark"] body .form-text,
html[data-theme="dark"] body .breadcrumb-item,
html[data-theme="dark"] body .sidebar-main-title p {
    color: var(--app-text-muted) !important;
}

html[data-theme="dark"] body a:not(.btn):not(.app-theme-select):not(.score-module-link):hover,
html[data-theme="dark"] body a:not(.btn):not(.app-theme-select):not(.score-module-link) {
    color: var(--theme-warning);
}

html[data-theme="dark"] body a:not(.btn):focus-visible {
    color: var(--theme-warning);
    text-decoration: underline;
}

html[data-theme="dark"] body .table,
html[data-theme="dark"] body table,
html[data-theme="dark"] body .table td,
html[data-theme="dark"] body .table th,
html[data-theme="dark"] body table td,
html[data-theme="dark"] body table th,
html[data-theme="dark"] body .dataTables_wrapper,
html[data-theme="dark"] body .dataTables_info,
html[data-theme="dark"] body .dataTables_length,
html[data-theme="dark"] body .dataTables_filter,
html[data-theme="dark"] body .dataTables_paginate {
    color: var(--app-text);
    border-color: var(--app-border) !important;
}

html[data-theme="dark"] body .table thead th,
html[data-theme="dark"] body table thead th,
html[data-theme="dark"] body .table tfoot th,
html[data-theme="dark"] body table tfoot th {
    background-color: var(--app-surface-raised) !important;
    color: var(--app-text) !important;
}

html[data-theme="dark"] body .table tbody tr,
html[data-theme="dark"] body .table tbody td,
html[data-theme="dark"] body table tbody tr,
html[data-theme="dark"] body table tbody td,
html[data-theme="dark"] body .table-striped tbody tr:nth-of-type(odd),
html[data-theme="dark"] body .table-striped tbody tr:nth-of-type(even) {
    background-color: var(--app-surface) !important;
    color: var(--app-text);
}

html[data-theme="dark"] body .table-hover tbody tr:hover > td,
html[data-theme="dark"] body table tbody tr:hover > td {
    background-color: var(--app-hover) !important;
    color: var(--app-text) !important;
}

html[data-theme="dark"] body input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
html[data-theme="dark"] body select,
html[data-theme="dark"] body textarea,
html[data-theme="dark"] body .form-control,
html[data-theme="dark"] body .form-control-plaintext,
html[data-theme="dark"] body .select2-container--default .select2-selection--single,
html[data-theme="dark"] body .select2-container--default .select2-selection--multiple,
html[data-theme="dark"] body .select2-dropdown,
html[data-theme="dark"] body .select2-results__option {
    border-color: var(--app-control-border) !important;
    background-color: var(--app-surface) !important;
    color: var(--app-text) !important;
}

html[data-theme="dark"] body input::placeholder,
html[data-theme="dark"] body textarea::placeholder,
html[data-theme="dark"] body .form-control::placeholder {
    color: var(--app-text-muted) !important;
    opacity: 1;
}

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,
html[data-theme="dark"] body .select2-container--focus .select2-selection,
html[data-theme="dark"] body .select2-container--open .select2-selection {
    border-color: var(--theme-warning) !important;
    outline: 2px solid rgba(235, 122, 99, 0.7);
    outline-offset: 1px;
    box-shadow: none !important;
}

html[data-theme="dark"] body input:disabled,
html[data-theme="dark"] body select:disabled,
html[data-theme="dark"] body textarea:disabled,
html[data-theme="dark"] body .form-control:disabled,
html[data-theme="dark"] body .form-control[readonly] {
    border-color: var(--app-control-border) !important;
    background-color: var(--app-surface-muted) !important;
    color: var(--app-text-disabled) !important;
    opacity: 1;
    cursor: not-allowed;
}

html[data-theme="dark"] body button:disabled,
html[data-theme="dark"] body .btn:disabled,
html[data-theme="dark"] body [aria-disabled="true"] {
    color: var(--app-text-disabled) !important;
    cursor: not-allowed;
}

html[data-theme="dark"] body .btn-light,
html[data-theme="dark"] body .btn-default,
html[data-theme="dark"] body .btn-outline-secondary,
html[data-theme="dark"] body .page-link,
html[data-theme="dark"] body .list-group-item,
html[data-theme="dark"] body .nav-tabs .nav-link:not(.active) {
    border-color: var(--app-border) !important;
    background-color: var(--app-surface-raised) !important;
    color: var(--app-text) !important;
}

html[data-theme="dark"] body .btn-light:hover,
html[data-theme="dark"] body .btn-default:hover,
html[data-theme="dark"] body .btn-outline-secondary:hover,
html[data-theme="dark"] body .page-link:hover,
html[data-theme="dark"] body .list-group-item-action:focus,
html[data-theme="dark"] body .nav-tabs .nav-link:not(.active):hover {
    border-color: var(--theme-deafult, #E35336) !important;
    background-color: var(--app-hover) !important;
    color: #242934 !important;
}

html[data-theme="dark"] body .btn-primary,
html[data-theme="dark"] body .btn-danger,
html[data-theme="dark"] body .page-item.active .page-link,
html[data-theme="dark"] body .nav-tabs .nav-link.active,
html[data-theme="dark"] body .sidebar-links > li.active > a,
html[data-theme="dark"] body .sidebar-links > li > a.active,
html[data-theme="dark"] body .score-module-sidebar .score-module-link.active {
    border-color: var(--theme-secondary, #B23A22) !important;
    background-color: var(--theme-secondary, #B23A22) !important;
    color: #fff !important;
}

html[data-theme="dark"] body .btn-primary:hover,
html[data-theme="dark"] body .btn-danger:hover,
html[data-theme="dark"] body .btn-primary:focus-visible,
html[data-theme="dark"] body .btn-danger:focus-visible {
    border-color: var(--theme-warning) !important;
    box-shadow: 0 0 0 2px rgba(235, 122, 99, 0.35);
}

html[data-theme="dark"] body button:not(:disabled):active,
html[data-theme="dark"] body .btn:not(:disabled):active {
    transform: translateY(1px);
}

html[data-theme="dark"] body a:not(.btn):active {
    text-decoration: underline;
}

html[data-theme="dark"] body .modal-header,
html[data-theme="dark"] body .modal-footer,
html[data-theme="dark"] body .card-header,
html[data-theme="dark"] body .card-footer,
html[data-theme="dark"] body .list-group-item,
html[data-theme="dark"] body hr,
html[data-theme="dark"] body .breadcrumb,
html[data-theme="dark"] body .app-account-menu-divider {
    border-color: var(--app-border) !important;
}

html[data-theme="dark"] body .app-sidebar-rail-toggle,
html[data-theme="dark"] body .app-header-icon-btn {
    border-color: var(--app-border);
    background-color: var(--app-surface);
    color: var(--app-text);
}

html[data-theme="dark"] body .app-sidebar-rail-toggle:hover,
html[data-theme="dark"] body .app-header-icon-btn:hover {
    border-color: var(--theme-deafult, #E35336);
    background-color: var(--theme-deafult, #E35336);
    color: #fff;
}

html[data-theme="dark"] body .sidebar-wrapper .sidebar-main .sidebar-links > li > a.sidebar-link.active,
html[data-theme="dark"] body .sidebar-wrapper .sidebar-main .sidebar-links > li.active > a.sidebar-link,
html[data-theme="dark"] body .sidebar-wrapper .sidebar-main .sidebar-links > li .sidebar-link.active {
    border-radius: 8px;
    background-color: rgba(227, 83, 54, 0.18) !important;
    color: var(--theme-warning) !important;
}

html[data-theme="dark"] body .sidebar-wrapper .sidebar-main .sidebar-links > li > a.sidebar-link.active svg,
html[data-theme="dark"] body .sidebar-wrapper .sidebar-main .sidebar-links > li.active > a.sidebar-link svg,
html[data-theme="dark"] body .sidebar-wrapper .sidebar-main .sidebar-links > li .sidebar-link.active svg {
    color: var(--theme-warning) !important;
    stroke: var(--theme-warning) !important;
}

html[data-theme="dark"] body .sidebar-wrapper .sidebar-main .sidebar-links > li:hover > a.sidebar-link:not(.active),
html[data-theme="dark"] body .sidebar-wrapper .sidebar-main .sidebar-links > li > a.sidebar-link:not(.active):hover {
    background-color: rgba(227, 83, 54, 0.12) !important;
    color: var(--theme-warning) !important;
}

html[data-theme="dark"] body .sidebar-wrapper .sidebar-main .sidebar-links > li:hover > a.sidebar-link:not(.active) svg,
html[data-theme="dark"] body .sidebar-wrapper .sidebar-main .sidebar-links > li > a.sidebar-link:not(.active):hover svg {
    stroke: var(--theme-warning) !important;
}

html[data-theme="dark"] body #pageWrapper.admin-sidebar-collapsed .sidebar-wrapper .sidebar-main .sidebar-links > li > a.sidebar-link:not(.active),
html[data-theme="dark"] body #pageWrapper.admin-sidebar-collapsed .sidebar-wrapper.close_icon .sidebar-main .sidebar-links > li > a.sidebar-link:not(.active) {
    color: var(--app-text-muted) !important;
}

html[data-theme="dark"] body #pageWrapper.admin-sidebar-collapsed .sidebar-wrapper .sidebar-main .sidebar-links > li > a.sidebar-link:not(.active) svg,
html[data-theme="dark"] body #pageWrapper.admin-sidebar-collapsed .sidebar-wrapper.close_icon .sidebar-main .sidebar-links > li > a.sidebar-link:not(.active) svg {
    color: var(--app-text-muted) !important;
    stroke: var(--app-text-muted) !important;
}

html[data-theme="dark"] body #pageWrapper.admin-sidebar-collapsed .sidebar-wrapper .sidebar-main .sidebar-links > li > a.sidebar-link:not(.active):hover,
html[data-theme="dark"] body #pageWrapper.admin-sidebar-collapsed .sidebar-wrapper.close_icon .sidebar-main .sidebar-links > li > a.sidebar-link:not(.active):hover {
    color: var(--theme-warning) !important;
}

html[data-theme="dark"] body #pageWrapper.admin-sidebar-collapsed .sidebar-wrapper .sidebar-main .sidebar-links > li > a.sidebar-link:not(.active):hover svg,
html[data-theme="dark"] body #pageWrapper.admin-sidebar-collapsed .sidebar-wrapper.close_icon .sidebar-main .sidebar-links > li > a.sidebar-link:not(.active):hover svg {
    color: var(--theme-warning) !important;
    stroke: var(--theme-warning) !important;
}

html[data-theme="dark"] body #pageWrapper.score-system-shell .score-module-sidebar .score-module-nav-link.is-active {
    border-radius: 6px;
    background-color: rgba(227, 83, 54, 0.18) !important;
    color: var(--theme-warning) !important;
}

html[data-theme="dark"] body #pageWrapper.score-system-shell .score-module-sidebar .score-module-nav-link:hover,
html[data-theme="dark"] body #pageWrapper.score-system-shell .score-module-sidebar .score-module-nav-link:focus-visible {
    background-color: rgba(227, 83, 54, 0.18) !important;
    color: var(--theme-warning) !important;
}

html[data-theme="dark"] body .score-status-tab {
    border-color: var(--app-border);
    background-color: var(--app-surface-raised);
    color: var(--app-text);
}

html[data-theme="dark"] body .score-status-tab:hover,
html[data-theme="dark"] body .score-status-tab:focus-visible {
    border-color: var(--theme-deafult, #E35336);
    background-color: rgba(227, 83, 54, 0.18);
    color: var(--theme-warning);
}

html[data-theme="dark"] body .score-status-tab.is-active {
    border-color: var(--theme-secondary, #B23A22);
    background-color: var(--theme-secondary, #B23A22);
    color: #fff;
}

html[data-theme="dark"] body .score-reviews-card {
    border-color: var(--app-border);
    background-color: var(--app-surface);
}

html[data-theme="dark"] body .score-reviews-table th,
html[data-theme="dark"] body .score-reviews-table td {
    border-color: var(--app-border) !important;
}

html[data-theme="dark"] body .score-reviews-table tbody tr:nth-child(even) > td {
    background-color: var(--app-surface-muted) !important;
}

html[data-theme="dark"] body .score-reviews-table tbody tr:nth-child(odd) > td {
    background-color: var(--app-surface) !important;
}

html[data-theme="dark"] body .score-reviews-table tbody tr:hover > td {
    background-color: var(--app-surface-raised) !important;
    color: var(--app-text) !important;
}

html[data-theme="dark"] body .score-reviews-table tbody tr:hover > td .text-muted {
    color: var(--app-text-muted) !important;
}

html[data-theme="dark"] body .score-action-btn {
    border-color: var(--theme-deafult, #E35336);
    color: var(--theme-warning);
}

html[data-theme="dark"] body .score-action-btn:hover,
html[data-theme="dark"] body .score-action-btn:focus-visible {
    background-color: rgba(227, 83, 54, 0.18);
    color: var(--theme-warning);
}

html[data-theme="dark"] body .score-action-btn-fill {
    border-color: var(--theme-secondary, #B23A22);
    background-color: var(--theme-secondary, #B23A22);
    color: #fff;
}

html[data-theme="dark"] body .score-action-btn-fill:hover,
html[data-theme="dark"] body .score-action-btn-fill:focus-visible {
    border-color: var(--theme-deafult, #E35336);
    background-color: var(--theme-deafult, #E35336);
    color: #fff;
    opacity: 1;
}

html[data-theme="dark"] body .score-status-pending {
    background-color: rgba(227, 83, 54, 0.18);
    color: var(--theme-warning);
}

html[data-theme="dark"] body .score-status-removed {
    background-color: var(--app-surface-raised);
    color: var(--app-text-muted);
}

html[data-theme="dark"] body .seller-subscription-page {
    color: var(--app-text) !important;
}

html[data-theme="dark"] body .seller-subscription-card {
    border-color: var(--app-border);
    background-color: var(--app-surface);
    color: var(--app-text);
}

html[data-theme="dark"] body .seller-subscription-muted {
    color: var(--app-text-muted) !important;
}

html[data-theme="dark"] body .seller-subscription-status {
    border: 1px solid rgba(235, 122, 99, 0.45);
    background-color: rgba(227, 83, 54, 0.18);
    color: var(--theme-warning);
}

html[data-theme="dark"] body .seller-subscription-table th,
html[data-theme="dark"] body .seller-subscription-table td {
    border-color: var(--app-border);
}

html[data-theme="dark"] body .seller-subscription-table thead th {
    background-color: var(--app-surface-raised);
    color: var(--app-text);
}

html[data-theme="dark"] body .seller-subscription-table tbody tr:nth-child(even) {
    background-color: var(--app-surface-muted) !important;
}

html[data-theme="dark"] body :focus-visible {
    outline-color: var(--theme-warning);
}

html[data-theme="dark"] body button:disabled,
html[data-theme="dark"] body .btn:disabled,
html[data-theme="dark"] body [aria-disabled="true"] {
    border-color: #59667a !important;
    background-color: #323846 !important;
    color: #cccccc !important;
    box-shadow: none !important;
    opacity: 0.75;
    transform: none;
}

html[data-theme="light"] body.em-login {
    --em-ink: #242934;
    --em-muted: #59667a;
    --em-border: #efefef;
    color: #2b2b2b;
    background:
        radial-gradient(ellipse 800px 500px at 15% 0%, rgba(227, 83, 54, 0.12), transparent 60%),
        radial-gradient(ellipse 700px 500px at 95% 100%, rgba(235, 122, 99, 0.1), transparent 60%),
        #f4f4f4;
}

html[data-theme="light"] body.em-login::before {
    background-image:
        linear-gradient(rgba(44, 50, 63, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(44, 50, 63, 0.035) 1px, transparent 1px);
}

html[data-theme="light"] body.em-login .em-login-hd h1 {
    color: #242934;
}

html[data-theme="light"] body.em-login .em-login-lead {
    color: #59667a;
}

html[data-theme="light"] body.em-login .em-login-audience li {
    border-color: #efefef;
    background: #fff;
    color: #59667a;
}

html[data-theme="dark"] body.em-login {
    --em-ink: #f4f4f4;
    --em-muted: #cccccc;
    --em-border: #898989;
    --em-surface: #262932;
    color: #f4f4f4;
    background:
        radial-gradient(ellipse 800px 500px at 15% 0%, rgba(227, 83, 54, 0.28), transparent 60%),
        radial-gradient(ellipse 700px 500px at 95% 100%, rgba(178, 58, 34, 0.2), transparent 60%),
        #1d1e26;
}

html[data-theme="dark"] body.em-login .em-login-hd h1 {
    color: #f4f4f4;
}

html[data-theme="dark"] body.em-login .em-login-card {
    border: 1px solid #59667a;
    background: #262932;
    color: #f4f4f4;
}

html[data-theme="dark"] body.em-login .em-login-card-head h2,
html[data-theme="dark"] body.em-login .em-login-field label {
    color: #f4f4f4;
}

html[data-theme="dark"] body.em-login .em-login-card-head p,
html[data-theme="dark"] body.em-login .em-login-remember,
html[data-theme="dark"] body.em-login .em-login-lead {
    color: #cccccc;
}

html[data-theme="dark"] body.em-login .em-login-field input[type="email"],
html[data-theme="dark"] body.em-login .em-login-field input[type="text"],
html[data-theme="dark"] body.em-login .em-login-field input[type="password"] {
    border-color: #898989;
    background: #2b2b2b;
    color: #f4f4f4;
}

html[data-theme="dark"] body.em-login .em-login-field input:hover,
html[data-theme="dark"] body.em-login .em-login-field input:focus {
    border-color: var(--theme-warning);
}

html[data-theme="dark"] body.em-login .em-login-field input:focus {
    background: #323846;
    outline: 2px solid rgba(235, 122, 99, 0.7);
    outline-offset: 1px;
}

html[data-theme="dark"] body.em-login .em-login-toggle:hover,
html[data-theme="dark"] body.em-login .em-login-toggle:focus-visible {
    background: #FCE9E4;
    color: #242934;
}

html[data-theme="dark"] body.em-login .em-login-alert {
    border-color: #B23A22;
    background: rgba(178, 58, 34, 0.2);
    color: var(--theme-warning);
}

html[data-theme="dark"] body.em-login .em-login-submit {
    background: #B23A22;
    color: #fff;
}

html[data-theme="dark"] body.em-login .em-login-submit:hover {
    background: #B23A22;
    filter: brightness(1.05);
}

html[data-theme="dark"] body.em-login .em-login-submit:focus-visible {
    outline: 2px solid var(--theme-warning);
    outline-offset: 3px;
}

html[data-theme="dark"] body.em-login .em-login-audience li {
    border-color: #898989;
    background: #323846;
    color: #f4f4f4;
}


html[data-theme="dark"] body .seller-inbox {
    color: var(--app-text);
}

html[data-theme="dark"] body .seller-inbox-card,
html[data-theme="dark"] body .seller-inbox-report-form {
    border-color: var(--app-border);
    background-color: var(--app-surface);
    color: var(--app-text);
}

html[data-theme="dark"] body .seller-inbox-chip {
    border-color: var(--app-border);
    background-color: var(--app-surface-raised);
    color: var(--app-text);
}

html[data-theme="dark"] body .seller-inbox-chip:hover,
html[data-theme="dark"] body .seller-inbox-chip:focus-visible {
    border-color: var(--theme-deafult, #E35336);
    background-color: rgba(227, 83, 54, 0.18);
    color: var(--theme-warning);
}

html[data-theme="dark"] body .seller-inbox-chip.is-active,
html[data-theme="dark"] body .seller-inbox-chip.is-active:hover {
    border-color: var(--theme-secondary, #B23A22);
    background-color: var(--theme-secondary, #B23A22);
    color: #fff;
}

html[data-theme="dark"] body .seller-inbox-mute,
html[data-theme="dark"] body .seller-inbox-report-form label {
    color: var(--app-text-muted);
}

html[data-theme="dark"] body .seller-inbox textarea,
html[data-theme="dark"] body .seller-inbox-report-form select {
    border-color: var(--app-control-border);
    background-color: var(--app-surface-raised);
    color: var(--app-text);
}

html[data-theme="dark"] body .seller-inbox textarea::placeholder {
    color: var(--app-text-muted);
    opacity: 1;
}

html[data-theme="dark"] body .seller-inbox-btn.outline {
    border-color: var(--theme-warning);
    color: var(--theme-warning);
}

html[data-theme="dark"] body .seller-inbox-btn:hover,
html[data-theme="dark"] body .seller-inbox-btn:focus-visible,
html[data-theme="dark"] body .seller-inbox-btn.outline:hover,
html[data-theme="dark"] body .seller-inbox-btn.outline:focus-visible {
    background-color: rgba(227, 83, 54, 0.18);
    color: var(--theme-warning);
}

html[data-theme="dark"] body .seller-inbox-pic {
    background-color: var(--app-surface-raised);
}

html[data-theme="dark"] body .pd-list-page .pd-list-card {
    border-color: var(--app-border);
}

html[data-theme="dark"] body .pd-list-page .ProductDetailTable thead th {
    border-color: var(--app-border) !important;
    background-color: var(--app-surface-raised) !important;
    color: var(--app-text) !important;
}

html[data-theme="dark"] body .pd-list-page .ProductDetailTable tbody tr > td {
    border-color: var(--app-border) !important;
    background-color: var(--app-surface) !important;
    color: var(--app-text) !important;
}

html[data-theme="dark"] body .pd-list-page .ProductDetailTable tbody tr:nth-child(even) > td {
    background-color: var(--app-surface-muted) !important;
}

html[data-theme="dark"] body .pd-list-page .ProductDetailTable tbody tr:hover > td {
    background-color: var(--app-surface-raised) !important;
    color: var(--app-text) !important;
}

html[data-theme="dark"] body .pd-list-page .ProductDetailTable tbody tr:hover > td .text-muted {
    color: var(--app-text-muted) !important;
}

html[data-theme="dark"] body .orders-list-page #basic-1 thead th {
    border-color: var(--app-border) !important;
    background-color: var(--app-surface-raised) !important;
    color: var(--app-text) !important;
}

html[data-theme="dark"] body .orders-list-page #basic-1 tbody tr > td {
    border-color: var(--app-border) !important;
    background-color: var(--app-surface) !important;
    color: var(--app-text) !important;
}

html[data-theme="dark"] body .orders-list-page #basic-1 tbody tr:nth-child(even) > td {
    background-color: var(--app-surface-muted) !important;
}

html[data-theme="dark"] body .orders-list-page #basic-1 tbody tr.ol-row--awaiting > td {
    background-color: rgba(227, 83, 54, 0.16) !important;
}

html[data-theme="dark"] body .orders-list-page #basic-1 tbody tr:hover > td {
    background-color: var(--app-surface-raised) !important;
    color: var(--app-text) !important;
}

html[data-theme="dark"] body .orders-list-page #basic-1 tbody tr.ol-row--awaiting:hover > td {
    background-color: rgba(227, 83, 54, 0.24) !important;
}

html[data-theme="dark"] body .orders-list-page #basic-1 tbody td.dataTables_empty,
html[data-theme="dark"] body .orders-list-page #basic-1 tbody tr:hover > td.dataTables_empty {
    background-color: var(--app-surface-muted) !important;
    color: var(--app-text-muted) !important;
}

html[data-theme="dark"] body .orders-list-page .ol-meta,
html[data-theme="dark"] body .orders-list-page .ol-count-key {
    color: var(--app-text-muted) !important;
}

html[data-theme="dark"] body .orders-list-page .ol-count-pair {
    border-color: var(--app-border);
    background-color: var(--app-surface-raised);
}

html[data-theme="dark"] body .orders-list-page .ol-count-val {
    color: var(--app-text);
}

html[data-theme="dark"] body .orders-list-page .ol-action-btn {
    border-color: var(--theme-deafult, #E35336);
    background-color: var(--app-surface-raised);
    color: var(--theme-warning);
}

html[data-theme="dark"] body .orders-list-page .ol-action-btn:hover,
html[data-theme="dark"] body .orders-list-page .ol-action-btn:focus-visible {
    border-color: var(--theme-deafult, #E35336);
    background-color: rgba(227, 83, 54, 0.18);
    color: var(--theme-warning);
}

html[data-theme="dark"] body .orders-list-page .ol-pill--delivered,
html[data-theme="dark"] body .orders-list-page .ol-pill--rejected,
html[data-theme="dark"] body .orders-list-page .ol-pill--returned {
    background-color: rgba(227, 83, 54, 0.18);
    color: var(--theme-warning);
    border-color: rgba(227, 83, 54, 0.4);
}

html[data-theme="dark"] body .orders-list-page .ol-pill--muted {
    border-color: var(--app-border);
    background-color: var(--app-surface-raised);
    color: var(--app-text-muted);
}

html[data-theme="dark"] body .orders-list-page .dataTables_wrapper .dataTables_paginate .paginate_button.current {
    border-color: var(--app-border) !important;
    background: var(--app-surface-raised) !important;
    color: var(--app-text) !important;
}

html[data-theme="dark"] body .oh-page {
    --oh-ink: var(--app-text);
    --oh-mute: var(--app-text-muted);
    --oh-line: var(--app-border);
    --oh-bg: var(--app-surface-raised);
    --oh-white: var(--app-surface);
    --oh-child: var(--app-surface-muted);
    --oh-hit: rgba(227, 83, 54, 0.18);
    --oh-hover: var(--app-surface-raised);
}

html[data-theme="dark"] body .oh-page .oh-card {
    border-color: var(--app-border);
    background-color: var(--app-surface);
}

html[data-theme="dark"] body .oh-page .oh-table th,
html[data-theme="dark"] body .oh-page .oh-table td {
    border-color: var(--app-border);
}

html[data-theme="dark"] body .oh-page .oh-table tbody tr > td {
    background-color: var(--app-surface) !important;
    color: var(--app-text) !important;
}

html[data-theme="dark"] body .oh-page .oh-table tbody tr.oh-child > td {
    background-color: var(--app-surface-muted) !important;
}

html[data-theme="dark"] body .oh-page .oh-table tbody tr.oh-child.oh-hit > td {
    background-color: var(--oh-hit) !important;
}

html[data-theme="dark"] body .oh-page .oh-table tbody tr:hover > td {
    background-color: var(--oh-hover) !important;
    color: var(--oh-ink) !important;
}

html[data-theme="dark"] body .oh-page .oh-table tbody tr.oh-child.oh-hit:hover > td {
    background-color: var(--oh-hit) !important;
}

html[data-theme="dark"] body .oh-page .oh-table tbody td.oh-empty,
html[data-theme="dark"] body .oh-page .oh-table tbody tr:hover > td.oh-empty {
    background-color: var(--app-surface) !important;
    color: var(--app-text-muted) !important;
}

html[data-theme="dark"] body .oh-page .oh-note {
    border: 1px solid var(--app-border);
    background-color: var(--app-surface-raised);
    color: var(--app-text-muted);
}

html[data-theme="dark"] body .oh-page .oh-pill--rejected,
html[data-theme="dark"] body .oh-page .oh-pill--mixed {
    background-color: rgba(178, 58, 34, 0.2);
    color: var(--theme-warning);
}

html[data-theme="dark"] body .order-detail-page {
    --od-line: var(--app-border);
    --od-stone: var(--app-surface-muted);
    --od-surface: var(--app-surface-raised);
    --od-panel: var(--app-surface);
    --od-ink: var(--app-text);
    --od-mute: var(--app-text-muted);
    color: var(--app-text);
}

html[data-theme="dark"] body .order-detail-page .od-count-pill,
html[data-theme="dark"] body .order-detail-page .od-sub,
html[data-theme="dark"] body .order-detail-page .od-stat,
html[data-theme="dark"] body .order-detail-page .od-section,
html[data-theme="dark"] body .order-detail-page .od-vendor-action-card,
html[data-theme="dark"] body .order-detail-page .od-receipt-thumb {
    border-color: var(--app-border);
    background-color: var(--app-surface);
    color: var(--app-text);
}

html[data-theme="dark"] body .order-detail-page .od-section-head,
html[data-theme="dark"] body .order-detail-page .od-sub-summary {
    border-color: var(--app-border);
    background-color: var(--app-surface-raised);
    color: var(--app-text);
}

html[data-theme="dark"] body .order-detail-page .od-sub-summary:hover,
html[data-theme="dark"] body .order-detail-page .od-sub-summary:focus-visible {
    background-color: rgba(227, 83, 54, 0.14);
}

html[data-theme="dark"] body .order-detail-page .od-sub-body,
html[data-theme="dark"] body .order-detail-page .od-sub-table th,
html[data-theme="dark"] body .order-detail-page .od-sub-table td,
html[data-theme="dark"] body .order-detail-page .od-audit-list li {
    border-color: var(--app-border);
}

html[data-theme="dark"] body .order-detail-page .od-sub-table tbody td {
    background-color: var(--app-surface) !important;
    color: var(--app-text) !important;
}

html[data-theme="dark"] body .order-detail-page .od-sub-table tbody tr:hover > td {
    background-color: var(--app-surface-raised) !important;
    color: var(--app-text) !important;
}

html[data-theme="dark"] body .order-detail-page .od-vendor-head {
    border-color: rgba(227, 83, 54, 0.35);
    background-color: rgba(227, 83, 54, 0.14);
}

html[data-theme="dark"] body .order-detail-page .od-vendor-head strong,
html[data-theme="dark"] body .order-detail-page .od-stat--primary .od-stat-value,
html[data-theme="dark"] body .order-detail-page .od-stat--secondary .od-stat-value {
    color: var(--theme-warning);
}

html[data-theme="dark"] body .order-detail-page .od-stat--accent {
    border-color: rgba(227, 83, 54, 0.4);
    background-color: rgba(227, 83, 54, 0.14);
}

html[data-theme="dark"] body .order-detail-page .od-stat--accent .od-stat-value {
    color: var(--theme-warning);
}

html[data-theme="dark"] body .order-detail-page .od-chip--status-pending,
html[data-theme="dark"] body .order-detail-page .od-chip--status-processing,
html[data-theme="dark"] body .order-detail-page .od-chip--status-dispatched,
html[data-theme="dark"] body .order-detail-page .od-chip--status-rejected,
html[data-theme="dark"] body .order-detail-page .od-chip--status-returned,
html[data-theme="dark"] body .order-detail-page .od-chip--pay,
html[data-theme="dark"] body .order-detail-page .od-chip--accent {
    border-color: rgba(227, 83, 54, 0.4);
    background-color: rgba(227, 83, 54, 0.16);
    color: var(--theme-warning);
}

html[data-theme="dark"] body .order-detail-page .od-chip--status-delivered {
    border-color: rgba(69, 90, 100, 0.7);
    background-color: rgba(69, 90, 100, 0.3);
    color: var(--app-text);
}

html[data-theme="dark"] body .order-detail-page .od-chip--status-inprogress {
    border-color: var(--app-border);
    background-color: var(--app-surface-raised);
    color: var(--app-text);
}

html[data-theme="dark"] body .order-detail-page .od-notice {
    border-color: rgba(227, 83, 54, 0.4);
    background-color: rgba(227, 83, 54, 0.14);
    color: var(--app-text);
}

html[data-theme="dark"] body .order-detail-page .od-notice strong {
    color: var(--theme-warning);
}

html[data-theme="dark"] body .order-detail-page .od-btn-outline,
html[data-theme="dark"] body .order-detail-page .od-btn-danger-outline {
    border-color: var(--theme-warning);
    background-color: var(--app-surface-raised);
    color: var(--theme-warning);
}

html[data-theme="dark"] body .order-detail-page .od-btn-outline:hover,
html[data-theme="dark"] body .order-detail-page .od-btn-outline:focus-visible,
html[data-theme="dark"] body .order-detail-page .od-btn-danger-outline:hover,
html[data-theme="dark"] body .order-detail-page .od-btn-danger-outline:focus-visible {
    border-color: var(--theme-deafult, #E35336);
    background-color: rgba(227, 83, 54, 0.18);
    color: var(--theme-warning);
}

html[data-theme="dark"] body .order-detail-page .od-receipt-empty {
    border-color: var(--app-border);
    background-color: var(--app-surface-raised);
    color: var(--app-text-muted);
}

html[data-theme="dark"] body .ni-page {
    --ni-ink: var(--app-text);
    --ni-mute: var(--app-text-muted);
    --ni-line: var(--app-border);
    --ni-bg: var(--app-surface-raised);
    --ni-white: var(--app-surface);
    --ni-soft: rgba(227, 83, 54, 0.18);
}

html[data-theme="dark"] body .ni-page .ni-card {
    border-color: var(--app-border);
    background-color: var(--app-surface);
    color: var(--app-text);
}

html[data-theme="dark"] body .ni-page .ni-table th {
    border-color: var(--app-border);
    background-color: var(--app-surface-raised);
    color: var(--app-text);
}

html[data-theme="dark"] body .ni-page .ni-table tbody tr > td {
    border-color: var(--app-border);
    background-color: var(--app-surface);
    color: var(--app-text);
}

html[data-theme="dark"] body .ni-page .ni-table tbody tr:nth-child(even) > td {
    background-color: var(--app-surface-muted);
}

html[data-theme="dark"] body .ni-page .ni-table tbody tr:hover > td {
    background-color: var(--app-surface-raised) !important;
    color: var(--app-text) !important;
}

html[data-theme="dark"] body .ni-page .ni-table tbody tr:hover > td .ni-audience-meta,
html[data-theme="dark"] body .ni-page .ni-table tbody tr:hover > td .ni-desc,
html[data-theme="dark"] body .ni-page .ni-table tbody tr:hover > td .ni-date-time {
    color: var(--app-text-muted) !important;
}

html[data-theme="dark"] body .ni-page .ni-table tbody td.ni-empty,
html[data-theme="dark"] body .ni-page .ni-table tbody tr:hover > td.ni-empty {
    background-color: var(--app-surface-muted) !important;
    color: var(--app-text-muted) !important;
}

html[data-theme="dark"] body .ni-page .ni-tab {
    border-color: var(--app-border);
    background-color: var(--app-surface-raised);
    color: var(--app-text);
}

html[data-theme="dark"] body .ni-page .ni-tab:hover,
html[data-theme="dark"] body .ni-page .ni-tab:focus-visible {
    border-color: var(--theme-deafult, #E35336);
    background-color: rgba(227, 83, 54, 0.18);
    color: var(--theme-warning);
}

html[data-theme="dark"] body .ni-page .ni-tab.on,
html[data-theme="dark"] body .ni-page .ni-tab.on:hover {
    border-color: var(--theme-secondary, #B23A22);
    background-color: var(--theme-secondary, #B23A22);
    color: #fff;
}

html[data-theme="dark"] body .ni-page .ni-tab.on i {
    background-color: #fff;
    color: var(--theme-secondary, #B23A22);
}

html[data-theme="dark"] body .ni-page .ni-search {
    border-color: var(--app-control-border);
    background-color: var(--app-surface-raised);
    color: var(--app-text);
}

html[data-theme="dark"] body .ni-page .ni-search::placeholder {
    color: var(--app-text-muted);
    opacity: 1;
}

html[data-theme="dark"] body .ni-page .ni-create {
    border-color: var(--theme-secondary, #B23A22);
    background-color: var(--theme-secondary, #B23A22);
    color: #fff;
}

html[data-theme="dark"] body .ni-page .ni-create:hover,
html[data-theme="dark"] body .ni-page .ni-create:focus-visible {
    border-color: var(--theme-deafult, #E35336);
    background-color: var(--theme-deafult, #E35336);
    color: #fff;
}

html[data-theme="dark"] body .ni-page .ni-view {
    border-color: var(--theme-warning);
    background-color: var(--app-surface-raised);
    color: var(--theme-warning);
}

html[data-theme="dark"] body .ni-page .ni-view:hover,
html[data-theme="dark"] body .ni-page .ni-view:focus-visible {
    border-color: var(--theme-deafult, #E35336);
    background-color: rgba(227, 83, 54, 0.18);
    color: var(--theme-warning);
}

html[data-theme="dark"] body .ni-page .ni-icon-btn {
    border-color: var(--app-border);
    background-color: var(--app-surface-raised);
    color: var(--app-text);
}

html[data-theme="dark"] body .ni-page .ni-icon-btn:hover,
html[data-theme="dark"] body .ni-page .ni-icon-btn:focus-visible {
    border-color: var(--theme-deafult, #E35336);
    background-color: rgba(227, 83, 54, 0.18);
    color: var(--theme-warning);
}

html[data-theme="dark"] body .ni-page .ni-icon-btn--ok:hover,
html[data-theme="dark"] body .ni-page .ni-icon-btn--ok:focus-visible {
    border-color: var(--app-border);
    color: var(--app-text);
}

html[data-theme="dark"] body .ni-page .ni-icon-btn--danger:hover,
html[data-theme="dark"] body .ni-page .ni-icon-btn--danger:focus-visible {
    border-color: var(--theme-secondary, #B23A22);
    color: var(--theme-warning);
}

html[data-theme="dark"] body .ni-page .ni-pill--approved,
html[data-theme="dark"] body .ni-page .ni-pill--active {
    background-color: rgba(69, 90, 100, 0.35);
    color: var(--app-text);
}

html[data-theme="dark"] body .ni-page .ni-pill--pending {
    background-color: rgba(227, 83, 54, 0.2);
    color: var(--theme-warning);
}

html[data-theme="dark"] body .ni-page .ni-pill--rejected,
html[data-theme="dark"] body .ni-page .ni-pill--inactive {
    background-color: rgba(178, 58, 34, 0.24);
    color: var(--theme-warning);
}

html[data-theme="dark"] body .ni-page .ni-pill--na {
    background-color: var(--app-surface-raised);
    color: var(--app-text-muted);
}

html[data-theme="dark"] body .ni-page .ni-page-btn {
    border-color: var(--app-border);
    background-color: var(--app-surface-raised);
    color: var(--app-text);
}

html[data-theme="dark"] body .ni-page .ni-page-btn:hover:not(:disabled),
html[data-theme="dark"] body .ni-page .ni-page-btn:focus-visible {
    border-color: var(--theme-deafult, #E35336);
    color: var(--theme-warning);
}

html[data-theme="dark"] body .ni-page .ni-page-btn.on {
    border-color: var(--theme-secondary, #B23A22);
    background-color: var(--theme-secondary, #B23A22);
    color: #fff;
}

html[data-theme="dark"] body .ni-page .ni-foot {
    color: var(--app-text-muted);
}

html[data-theme="dark"] body .searchable-multi-select .searchable-multi-select-menu {
    border-color: var(--app-border) !important;
    background-color: var(--app-surface) !important;
    color: var(--app-text) !important;
}

html[data-theme="dark"] body .searchable-multi-select .searchable-multi-select-button,
html[data-theme="dark"] body .searchable-multi-select .searchable-multi-select-button.has-selection {
    border-color: var(--app-border) !important;
    background-color: var(--app-surface-raised) !important;
    color: var(--app-text) !important;
}

html[data-theme="dark"] body .searchable-multi-select .searchable-multi-select-button:hover,
html[data-theme="dark"] body .searchable-multi-select .searchable-multi-select-button:focus-visible {
    border-color: var(--theme-deafult, #E35336) !important;
    background-color: rgba(227, 83, 54, 0.18) !important;
    color: var(--app-text) !important;
}

html[data-theme="dark"] body .searchable-multi-select .searchable-multi-select-search {
    border-color: var(--app-control-border) !important;
    background-color: var(--app-surface-raised) !important;
    color: var(--app-text) !important;
}

html[data-theme="dark"] body .searchable-multi-select .searchable-multi-select-search::placeholder {
    color: var(--app-text-muted) !important;
    opacity: 1;
}

html[data-theme="dark"] body .searchable-multi-select .searchable-multi-select-option,
html[data-theme="dark"] body .searchable-multi-select .searchable-multi-select-option .searchable-multi-select-option-text {
    color: var(--app-text) !important;
}

html[data-theme="dark"] body .searchable-multi-select .searchable-multi-select-option:hover,
html[data-theme="dark"] body .searchable-multi-select .searchable-multi-select-option:hover .searchable-multi-select-option-text,
html[data-theme="dark"] body .searchable-multi-select .searchable-multi-select-option:focus-within,
html[data-theme="dark"] body .searchable-multi-select .searchable-multi-select-option:focus-within .searchable-multi-select-option-text {
    background-color: var(--app-surface-muted) !important;
    color: var(--app-text) !important;
}

html[data-theme="dark"] body .searchable-multi-select .searchable-multi-select-option.is-selected,
html[data-theme="dark"] body .searchable-multi-select .searchable-multi-select-option.is-selected .searchable-multi-select-option-text {
    background-color: rgba(227, 83, 54, 0.16) !important;
    color: var(--theme-warning) !important;
}

html[data-theme="dark"] body .searchable-multi-select .searchable-multi-select-divider {
    border-color: var(--app-border) !important;
}

html[data-theme="dark"] body .notification-create-page {
    --nc-ink: var(--app-text);
    --nc-muted: var(--app-text-muted);
    --nc-line: var(--app-border);
    --nc-surface: var(--app-surface);
    --nc-surface-muted: var(--app-surface-raised);
    color: var(--app-text);
}

html[data-theme="dark"] body .notification-create-page .notification-create-card {
    border-color: var(--app-border);
    background-color: var(--app-surface);
}

html[data-theme="dark"] body .notification-create-page #productDropdownButton,
html[data-theme="dark"] body .notification-create-page #productDropdownButton:hover,
html[data-theme="dark"] body .notification-create-page #productDropdownButton:focus-visible {
    border-color: var(--app-border) !important;
    background-color: var(--app-surface-raised) !important;
    color: var(--app-text) !important;
}

html[data-theme="dark"] body .notification-create-page #productDropdownMenu {
    border-color: var(--app-border);
    background-color: var(--app-surface);
    color: var(--app-text);
}

html[data-theme="dark"] body .notification-create-page #productDropdownMenu .form-check:hover {
    background-color: var(--app-surface-raised);
}

html[data-theme="dark"] body .notification-create-page #productDropdownMenu .form-check-label,
html[data-theme="dark"] body .notification-create-page #productDropdownMenu .text-muted {
    color: var(--app-text-muted) !important;
}

html[data-theme="dark"] body .notification-create-page #productDropdownMenu hr {
    border-color: var(--app-border) !important;
}

html[data-theme="dark"] body .notification-create-page #selectedProductCount {
    border-color: rgba(227, 83, 54, 0.4);
    background-color: rgba(227, 83, 54, 0.18);
    color: var(--theme-warning);
}

html[data-theme="dark"] body .notification-create-page .product-preview-tile {
    border-color: var(--app-border);
    background-color: var(--app-surface-raised);
    color: var(--app-text);
}

html[data-theme="dark"] body .notification-create-page .notification-create-back,
html[data-theme="dark"] body .notification-create-page .notification-create-back:hover,
html[data-theme="dark"] body .notification-create-page .notification-create-back:focus-visible {
    border-color: var(--theme-warning) !important;
    background-color: var(--app-surface-raised) !important;
    color: var(--theme-warning) !important;
}

html[data-theme="dark"] body .notification-create-page .notification-create-submit {
    border-color: var(--theme-secondary, #B23A22) !important;
    background-color: var(--theme-secondary, #B23A22) !important;
    color: #fff !important;
}

html[data-theme="dark"] body .notification-create-page .notification-create-submit:hover,
html[data-theme="dark"] body .notification-create-page .notification-create-submit:focus-visible {
    border-color: var(--theme-deafult, #E35336) !important;
    background-color: var(--theme-deafult, #E35336) !important;
    color: #fff !important;
}

/* ── Dashboard stat cards: soften icon backgrounds in dark mode ── */
html[data-theme="dark"] body .bg-primary .media.static-top-widget .align-self-center,
html[data-theme="dark"] body .bg-secondary .media.static-top-widget .align-self-center,
html[data-theme="dark"] body .bg-danger .media.static-top-widget .align-self-center {
    background-color: var(--app-surface-raised) !important;
}

html[data-theme="dark"] body .bg-primary .media.static-top-widget .align-self-center svg,
html[data-theme="dark"] body .bg-secondary .media.static-top-widget .align-self-center svg,
html[data-theme="dark"] body .bg-danger .media.static-top-widget .align-self-center svg {
    stroke: var(--theme-warning) !important;
}

/* ── Global DataTables pagination — dark mode ──────────────────────────────
   datatables.css sets .paginate_button.current to a white-to-#dcdcdc gradient
   with color:#333 !important — both invisible on dark backgrounds.
   These rules override globally for both dark-mode selectors used in this app.
   ─────────────────────────────────────────────────────────────────────────── */
body.dark-only .dataTables_wrapper .dataTables_paginate .paginate_button {
    color: rgba(255, 255, 255, 0.75) !important;
}

body.dark-only .dataTables_wrapper .dataTables_paginate .paginate_button.current,
body.dark-only .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: #374558 !important;
    border-color: #4a5e78 !important;
    color: #e0e6ef !important;
}

body.dark-only .dataTables_wrapper .dataTables_paginate .paginate_button:not(.current):not(.disabled):hover {
    background: #262932 !important;
    border-color: #374558 !important;
    color: #e0e6ef !important;
}

body.dark-only .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
body.dark-only .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    color: #59667a !important;
}

html[data-theme="dark"] body .dataTables_wrapper .dataTables_paginate .paginate_button {
    color: rgba(255, 255, 255, 0.75) !important;
}

html[data-theme="dark"] body .dataTables_wrapper .dataTables_paginate .paginate_button.current,
html[data-theme="dark"] body .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: #374558 !important;
    border-color: #4a5e78 !important;
    color: #e0e6ef !important;
}

html[data-theme="dark"] body .dataTables_wrapper .dataTables_paginate .paginate_button:not(.current):not(.disabled):hover {
    background: #262932 !important;
    border-color: #374558 !important;
    color: #e0e6ef !important;
}

html[data-theme="dark"] body .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
html[data-theme="dark"] body .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    color: #59667a !important;
}

/* ── Toastr: full opacity + dark-mode polish ─────────────────────── */
#toast-container > div {
    opacity: 1;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .18);
    border-radius: 8px;
    border-left: 4px solid transparent;
}
#toast-container > .toast-success { background-color: #2ecc54; border-left-color: #1fa33e; }
#toast-container > .toast-error   { background-color: #e74c3c; border-left-color: #c0392b; }
#toast-container > .toast-warning { background-color: #f39c12; border-left-color: #d68910; }
#toast-container > .toast-info    { background-color: #3498db; border-left-color: #2176ae; }

html[data-theme="dark"] #toast-container > div {
    box-shadow: 0 2px 16px rgba(0, 0, 0, .45);
}
html[data-theme="dark"] #toast-container > .toast-success { background-color: #27ae60; }
html[data-theme="dark"] #toast-container > .toast-error   { background-color: #c0392b; }
html[data-theme="dark"] #toast-container > .toast-warning { background-color: #d68910; }
html[data-theme="dark"] #toast-container > .toast-info    { background-color: #2176ae; }
