/* Tema scuro opzionale di MyCharBook.
 * Si attiva aggiungendo data-theme="dark" all'elemento html.
 */

html[data-theme="dark"] {
    color-scheme: dark;
    --mcb-dark-bg: #15181c;
    --mcb-dark-surface: #20252b;
    --mcb-dark-surface-alt: #282e35;
    --mcb-dark-border: #3a424b;
    --mcb-dark-text: #e6eaee;
    --mcb-dark-muted: #aeb7c1;
    --mcb-dark-primary: #c56bea;
}

html[data-theme="dark"] body {
    background: var(--mcb-dark-bg) !important;
    color: var(--mcb-dark-text);
}

html[data-theme="dark"] .main-panel,
html[data-theme="dark"] .content,
html[data-theme="dark"] .container-fluid {
    background: transparent;
}

html[data-theme="dark"] .navbar.navbar-transparent {
    background-color: transparent !important;
}

html[data-theme="dark"] .navbar .navbar-brand,
html[data-theme="dark"] .navbar .navbar-nav > li > a,
html[data-theme="dark"] .navbar .navbar-nav > li > button,
html[data-theme="dark"] .navbar .navbar-nav > li > a .material-icons {
    color: var(--mcb-dark-text) !important;
}

html[data-theme="dark"] .theme-toggle {
    margin: 0 8px 0 0;
    color: var(--mcb-dark-text) !important;
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .well,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .popover {
    background-color: var(--mcb-dark-surface) !important;
    color: var(--mcb-dark-text);
    border-color: var(--mcb-dark-border);
}

html[data-theme="dark"] .card .card-title,
html[data-theme="dark"] .card .category,
html[data-theme="dark"] .panel-title,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6,
html[data-theme="dark"] label,
html[data-theme="dark"] legend,
html[data-theme="dark"] .control-label {
    color: var(--mcb-dark-text);
}

html[data-theme="dark"] p,
html[data-theme="dark"] li,
html[data-theme="dark"] .help-block,
html[data-theme="dark"] small,
html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .category {
    color: var(--mcb-dark-muted);
}

html[data-theme="dark"] a,
html[data-theme="dark"] .dropdown-menu > li > a {
    color: #d58af2;
}

html[data-theme="dark"] a:hover,
html[data-theme="dark"] a:focus,
html[data-theme="dark"] .dropdown-menu > li > a:hover,
html[data-theme="dark"] .dropdown-menu > li > a:focus {
    color: #f0b8ff;
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] select.form-control,
html[data-theme="dark"] textarea.form-control,
html[data-theme="dark"] input.form-control,
html[data-theme="dark"] .select2-container .select2-selection--single,
html[data-theme="dark"] .select2-container .select2-selection--multiple {
    background-color: var(--mcb-dark-surface-alt) !important;
    color: var(--mcb-dark-text) !important;
    border-color: var(--mcb-dark-border) !important;
}

html[data-theme="dark"] .form-control::placeholder {
    color: #89939e;
}

html[data-theme="dark"] .form-control:focus {
    border-color: var(--mcb-dark-primary) !important;
    box-shadow: 0 1px 0 0 var(--mcb-dark-primary);
}

html[data-theme="dark"] .table,
html[data-theme="dark"] .table > thead > tr > th,
html[data-theme="dark"] .table > tbody > tr > td,
html[data-theme="dark"] .table > tfoot > tr > th {
    color: var(--mcb-dark-text);
    border-color: var(--mcb-dark-border);
}

html[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd),
html[data-theme="dark"] table.dataTable tbody tr.odd {
    background-color: rgba(255, 255, 255, .035);
}

html[data-theme="dark"] .table-hover > tbody > tr:hover,
html[data-theme="dark"] table.dataTable tbody tr:hover {
    background-color: rgba(197, 107, 234, .12);
}

html[data-theme="dark"] .profile-plays-table,
html[data-theme="dark"] .profile-plays-table thead th,
html[data-theme="dark"] .profile-plays-table tfoot th {
    color: var(--mcb-dark-text) !important;
    border-color: var(--mcb-dark-border) !important;
}

html[data-theme="dark"] .profile-plays-table tbody tr,
html[data-theme="dark"] .profile-plays-table.table-striped > tbody > tr:nth-of-type(odd),
html[data-theme="dark"] .profile-plays-table.table-striped > tbody > tr:nth-of-type(even) {
    background: var(--mcb-dark-surface) !important;
    color: var(--mcb-dark-text) !important;
}

html[data-theme="dark"] .profile-plays-table tbody tr:hover {
    background: var(--mcb-dark-surface-alt) !important;
}

html[data-theme="dark"] .profile-plays-table tbody td,
html[data-theme="dark"] .profile-plays-table .play-character,
html[data-theme="dark"] .profile-plays-table .play-date {
    color: var(--mcb-dark-text) !important;
}

html[data-theme="dark"] .profile-plays-table .play-title {
    color: #efb7ff !important;
}

/* Schede dei personaggi nel profilo: il colore chiaro del tema deve prevalere
   sulla regola inline della pagina, che altrimenti lascia il nome quasi nero. */
html[data-theme="dark"] .profile-content .profile-item-card h3 {
    color: var(--mcb-dark-text) !important;
}

html[data-theme="dark"] .profile-content .profile-item-card h3:hover,
html[data-theme="dark"] .profile-content .profile-item-card a:hover h3 {
    color: #f0b8ff !important;
}

html[data-theme="dark"] .personaggi-filters {
    background: var(--mcb-dark-surface) !important;
    border: 1px solid var(--mcb-dark-border);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
}

html[data-theme="dark"] .personaggio-card {
    background: var(--mcb-dark-surface) !important;
    border: 1px solid var(--mcb-dark-border);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

html[data-theme="dark"] .personaggio-card:hover {
    border-color: #86509c;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .32);
    transform: translateY(-2px);
}

html[data-theme="dark"] .personaggio-card h4 {
    color: var(--mcb-dark-text);
}

html[data-theme="dark"] .personaggio-meta {
    color: var(--mcb-dark-muted);
}

html[data-theme="dark"] .personaggio-avatar-wrap {
    background: var(--mcb-dark-surface-alt);
    border: 1px solid var(--mcb-dark-border);
}

html[data-theme="dark"] .personaggio-status.private {
    background: #343a40;
    color: #d0d6dc;
}

html[data-theme="dark"] .corp-filters {
    background: var(--mcb-dark-surface) !important;
    border: 1px solid var(--mcb-dark-border);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
}

html[data-theme="dark"] .corp-card {
    background: var(--mcb-dark-surface) !important;
    border: 1px solid var(--mcb-dark-border);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

html[data-theme="dark"] .corp-card:hover {
    border-color: #b86b35;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .32);
    transform: translateY(-2px);
}

html[data-theme="dark"] .corp-card h3 {
    color: var(--mcb-dark-text);
}

html[data-theme="dark"] .corp-meta {
    color: var(--mcb-dark-muted);
}

html[data-theme="dark"] .corp-avatar-wrap {
    background: var(--mcb-dark-surface-alt);
    border: 1px solid var(--mcb-dark-border);
}

html[data-theme="dark"] .corp-status.private {
    background: #343a40;
    color: #d0d6dc;
}

/* Personaggi recenti in home: le card ereditano il bianco del tema chiaro. */
html[data-theme="dark"] .latest-character-card {
    background: var(--mcb-dark-surface-alt) !important;
    color: var(--mcb-dark-text) !important;
    border-color: #4a5560 !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .28) !important;
}

html[data-theme="dark"] .latest-character-card:hover {
    background: #303740 !important;
    border-color: #c56bea !important;
    box-shadow: 0 12px 26px rgba(0, 0, 0, .38) !important;
}

html[data-theme="dark"] .latest-character-card > a,
html[data-theme="dark"] .latest-character-card h4 {
    color: var(--mcb-dark-text) !important;
}

html[data-theme="dark"] .latest-character-card p {
    color: var(--mcb-dark-muted) !important;
}

html[data-theme="dark"] .latest-character-card p a {
    color: #efb7ff !important;
}

html[data-theme="dark"] .latest-character-card img {
    border-color: #56616d !important;
}

html[data-theme="dark"] .affiliati-intro,
html[data-theme="dark"] .affiliati-section .text-muted {
    color: var(--mcb-dark-muted) !important;
}

html[data-theme="dark"] .affiliati-section h2 {
    color: var(--mcb-dark-text) !important;
}

html[data-theme="dark"] .affiliate-item a {
    background: var(--mcb-dark-surface-alt) !important;
    border-color: #4a5560 !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .22);
}

html[data-theme="dark"] .affiliate-item a:hover,
html[data-theme="dark"] .affiliate-item a:focus {
    background: #303740 !important;
    border-color: #c56bea !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .34);
}

html[data-theme="dark"] .banner-group h3 {
    color: var(--mcb-dark-text) !important;
}

html[data-theme="dark"] .banner-card {
    background: var(--mcb-dark-surface-alt) !important;
    border-color: #4a5560 !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .22);
}

html[data-theme="dark"] .banner-url {
    background: #1b2026 !important;
    border-color: #4a5560 !important;
    color: var(--mcb-dark-muted) !important;
}

/* CKEditor: toolbar e controlli appartengono alla pagina, il contenuto
   dell’iframe è definito in assets/css/ckeditor-dark.css. */
html[data-theme="dark"] .cke_chrome {
    border-color: var(--mcb-dark-border) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .22) !important;
}

html[data-theme="dark"] .cke_top,
html[data-theme="dark"] .cke_bottom,
html[data-theme="dark"] .cke_toolgroup,
html[data-theme="dark"] .cke_combo_button {
    background: var(--mcb-dark-surface) !important;
    border-color: var(--mcb-dark-border) !important;
}

html[data-theme="dark"] .cke_top {
    background: var(--mcb-dark-surface-alt) !important;
}

html[data-theme="dark"] .cke_button,
html[data-theme="dark"] .cke_combo_text,
html[data-theme="dark"] .cke_button_label,
html[data-theme="dark"] .cke_path_item,
html[data-theme="dark"] .cke_path_empty {
    color: var(--mcb-dark-text) !important;
}

html[data-theme="dark"] .cke_button:hover,
html[data-theme="dark"] .cke_button:focus,
html[data-theme="dark"] .cke_button_on,
html[data-theme="dark"] .cke_combo_button:hover,
html[data-theme="dark"] .cke_combo_button:focus {
    background: #3a424b !important;
}

html[data-theme="dark"] .cke_contents,
html[data-theme="dark"] .cke_wysiwyg_frame,
html[data-theme="dark"] .cke_source {
    background: #282e35 !important;
    color: var(--mcb-dark-text) !important;
}

html[data-theme="dark"] .cke_resizer {
    border-color: #8d99a5 !important;
}

html[data-theme="dark"] .cke_panel,
html[data-theme="dark"] .cke_menu_panel,
html[data-theme="dark"] .cke_combopanel {
    background: var(--mcb-dark-surface) !important;
    border-color: var(--mcb-dark-border) !important;
}

html[data-theme="dark"] .cke_panel_listItem a,
html[data-theme="dark"] .cke_menu a {
    color: var(--mcb-dark-text) !important;
}

html[data-theme="dark"] .cke_panel_listItem a:hover,
html[data-theme="dark"] .cke_menu a:hover {
    background: #3a424b !important;
    color: #fff !important;
}

html[data-theme="dark"] .giocata-privacy.private,
html[data-theme="dark"] .personaggio-status.private,
html[data-theme="dark"] .corp-status.private {
    background: #343a40 !important;
    color: #d0d6dc !important;
}

html[data-theme="dark"] .giocata-privacy.public,
html[data-theme="dark"] .personaggio-status.public,
html[data-theme="dark"] .corp-status.public {
    background: #23452d !important;
    color: #a9e6b5 !important;
}

html[data-theme="dark"] .giocata-privacy.followers,
html[data-theme="dark"] .personaggio-status.followers,
html[data-theme="dark"] .corp-status.followers {
    background: #1d3d58 !important;
    color: #a9d8ff !important;
}

html[data-theme="dark"] .giocata-privacy.friends,
html[data-theme="dark"] .personaggio-status.friends,
html[data-theme="dark"] .corp-status.friends {
    background: #3d2a50 !important;
    color: #e0b8ff !important;
}

html[data-theme="dark"] .giocata-privacy.close-friends,
html[data-theme="dark"] .personaggio-status.close-friends,
html[data-theme="dark"] .corp-status.close-friends {
    background: #4a351f !important;
    color: #ffd39b !important;
}

html[data-theme="dark"] .page-privacy.private {
    background: #343a40 !important;
    color: #d0d6dc !important;
}

html[data-theme="dark"] .page-privacy.public {
    background: #23452d !important;
    color: #a9e6b5 !important;
}

html[data-theme="dark"] .page-privacy.followers {
    background: #1d3d58 !important;
    color: #a9d8ff !important;
}

html[data-theme="dark"] .page-privacy.friends {
    background: #3d2a50 !important;
    color: #e0b8ff !important;
}

html[data-theme="dark"] .page-privacy.close-friends {
    background: #4a351f !important;
    color: #ffd39b !important;
}

html[data-theme="dark"] #custom-pages-table tbody tr,
html[data-theme="dark"] #custom-pages-table.table-striped > tbody > tr:nth-of-type(odd),
html[data-theme="dark"] #custom-pages-table.table-striped > tbody > tr:nth-of-type(even) {
    background: var(--mcb-dark-surface) !important;
    color: var(--mcb-dark-text) !important;
}

html[data-theme="dark"] #custom-pages-table tbody tr:hover {
    background: var(--mcb-dark-surface-alt) !important;
}

html[data-theme="dark"] #custom-skins-table tbody tr,
html[data-theme="dark"] #custom-skins-table.table-striped > tbody > tr:nth-of-type(odd),
html[data-theme="dark"] #custom-skins-table.table-striped > tbody > tr:nth-of-type(even) {
    background: var(--mcb-dark-surface) !important;
    color: var(--mcb-dark-text) !important;
}

html[data-theme="dark"] #custom-skins-table tbody tr:hover {
    background: var(--mcb-dark-surface-alt) !important;
}

html[data-theme="dark"] .custom-skin-privacy.private {
    background: #343a40 !important;
    color: #d0d6dc !important;
}

html[data-theme="dark"] .custom-skin-privacy.public {
    background: #23452d !important;
    color: #a9e6b5 !important;
}

html[data-theme="dark"] .custom-skin-privacy.cloneable {
    background: #1d3d58 !important;
    color: #a9d8ff !important;
}

html[data-theme="dark"] div.dataTables_wrapper div.dataTables_length,
html[data-theme="dark"] div.dataTables_wrapper div.dataTables_filter,
html[data-theme="dark"] div.dataTables_wrapper div.dataTables_info,
html[data-theme="dark"] div.dataTables_wrapper div.dataTables_paginate,
html[data-theme="dark"] div.dataTables_wrapper div.dataTables_filter label {
    color: var(--mcb-dark-muted);
}

html[data-theme="dark"] div.dataTables_wrapper div.dataTables_filter input,
html[data-theme="dark"] div.dataTables_wrapper div.dataTables_length select {
    color: var(--mcb-dark-text);
    background: var(--mcb-dark-surface-alt);
    border-color: var(--mcb-dark-border);
}

html[data-theme="dark"] hr,
html[data-theme="dark"] .nav-tabs,
html[data-theme="dark"] .nav-tabs > li > a,
html[data-theme="dark"] .nav-pills > li > a {
    border-color: var(--mcb-dark-border);
}

html[data-theme="dark"] .nav-tabs > li > a,
html[data-theme="dark"] .nav-pills > li > a {
    color: var(--mcb-dark-muted);
}

html[data-theme="dark"] .nav-tabs > li.active > a,
html[data-theme="dark"] .nav-tabs > li.active > a:hover,
html[data-theme="dark"] .nav-tabs > li.active > a:focus,
html[data-theme="dark"] .nav-pills > li.active > a {
    color: var(--mcb-dark-text);
    background-color: var(--mcb-dark-surface-alt);
    border-color: var(--mcb-dark-border);
}

html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer,
html[data-theme="dark"] .list-group-item,
html[data-theme="dark"] .dropdown-menu .divider {
    border-color: var(--mcb-dark-border);
}

html[data-theme="dark"] .social-notification-item,
html[data-theme="dark"] .social-notification-menu .dropdown-header {
    color: var(--mcb-dark-text);
    background-color: var(--mcb-dark-surface);
    border-color: var(--mcb-dark-border);
}

html[data-theme="dark"] .social-notification-item.is-unread {
    background-color: #3a303d;
}

html[data-theme="dark"] .alert-info,
html[data-theme="dark"] .alert-warning,
html[data-theme="dark"] .alert-success,
html[data-theme="dark"] .alert-danger {
    color: var(--mcb-dark-text);
    border-color: var(--mcb-dark-border);
}

html[data-theme="dark"] .footer,
html[data-theme="dark"] .footer a {
    color: var(--mcb-dark-muted);
}

html[data-theme="dark"] .skip-link {
    background: var(--mcb-dark-surface);
    color: var(--mcb-dark-text);
}

html[data-theme="dark"] .select2-dropdown,
html[data-theme="dark"] .select2-results__option,
html[data-theme="dark"] .select2-search--dropdown .select2-search__field {
    color: var(--mcb-dark-text);
    background-color: var(--mcb-dark-surface);
    border-color: var(--mcb-dark-border);
}

html[data-theme="dark"] .select2-results__option--highlighted[aria-selected] {
    background-color: #6a1b7a;
}

html[data-theme="dark"] .skin-help,
html[data-theme="dark"] .skin-editor-pane > .form-group > label,
html[data-theme="dark"] .skin-tags-pane > .skin-help {
    color: var(--mcb-dark-muted) !important;
}

html[data-theme="dark"] .skin-tags-help {
    background: var(--mcb-dark-surface) !important;
    border-color: var(--mcb-dark-border) !important;
}

html[data-theme="dark"] .skin-tags-accordion > .skin-tags-help > summary {
    background: var(--mcb-dark-surface-alt) !important;
    color: var(--mcb-dark-text) !important;
}

html[data-theme="dark"] .skin-tags-help > p,
html[data-theme="dark"] .skin-tags-help > p.skin-help,
html[data-theme="dark"] .skin-tags-help code {
    color: var(--mcb-dark-muted) !important;
}

html[data-theme="dark"] .skin-tags-help code {
    background: #343a40 !important;
    border: 1px solid #515c67;
    padding: 2px 5px;
    border-radius: 3px;
}

html[data-theme="dark"] .skin-tags-accordion > .skin-tags-help > summary:hover,
html[data-theme="dark"] .skin-tags-accordion > .skin-tags-help > summary:focus {
    background: #323a42 !important;
    color: #fff !important;
}

html[data-theme="dark"] .skin-tags-accordion > .skin-tags-help > summary::before {
    color: var(--mcb-dark-primary) !important;
}

html[data-theme="dark"] .skin-tag.btn-default,
html[data-theme="dark"] .skin-tag.btn-default:hover,
html[data-theme="dark"] .skin-tag.btn-default:focus {
    color: var(--mcb-dark-text) !important;
    background: #343b43 !important;
    border-color: #515c67 !important;
}

html[data-theme="dark"] #container ul.filetree a,
html[data-theme="dark"] ul.filetree a {
    color: var(--mcb-dark-text) !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

html[data-theme="dark"] #container ul.filetree a:hover,
html[data-theme="dark"] #container ul.filetree a:focus,
html[data-theme="dark"] ul.filetree a:hover,
html[data-theme="dark"] ul.filetree a:focus {
    background: #343b43 !important;
    color: #fff !important;
}

html[data-theme="dark"] ul.filetree ul {
    border-left-color: var(--mcb-dark-border) !important;
}

html[data-theme="dark"] .CodeMirror {
    color: #d7dee5 !important;
    background: #171b1f !important;
    border-color: var(--mcb-dark-border) !important;
}

html[data-theme="dark"] .CodeMirror-gutters,
html[data-theme="dark"] .CodeMirror-scrollbar-filler,
html[data-theme="dark"] .CodeMirror-gutter-filler {
    background: #20252b !important;
    border-color: var(--mcb-dark-border) !important;
}

html[data-theme="dark"] .CodeMirror-linenumber {
    color: #7f8b96 !important;
}

html[data-theme="dark"] .CodeMirror-cursor {
    border-left-color: #f0b8ff !important;
}

html[data-theme="dark"] .CodeMirror-selected,
html[data-theme="dark"] .CodeMirror-focused .CodeMirror-selected,
html[data-theme="dark"] .CodeMirror-line::selection,
html[data-theme="dark"] .CodeMirror-line > span::selection,
html[data-theme="dark"] .CodeMirror-line > span > span::selection {
    background: #4b3d55 !important;
}

html[data-theme="dark"] .cm-s-default .cm-comment { color: #7f9b78; }
html[data-theme="dark"] .cm-s-default .cm-keyword { color: #e59cf4; }
html[data-theme="dark"] .cm-s-default .cm-string,
html[data-theme="dark"] .cm-s-default .cm-string-2 { color: #f2bd7b; }
html[data-theme="dark"] .cm-s-default .cm-tag { color: #79d2a3; }
html[data-theme="dark"] .cm-s-default .cm-attribute { color: #8dc9ff; }
html[data-theme="dark"] .cm-s-default .cm-property { color: #d8a7f1; }
html[data-theme="dark"] .cm-s-default .cm-number { color: #a8d98c; }
html[data-theme="dark"] .cm-s-default .cm-def,
html[data-theme="dark"] .cm-s-default .cm-variable { color: #c9d5df; }

html[data-theme="dark"] .cm-s-mcb-dark {
    color: #d7dee5;
    background: #171b1f;
}

html[data-theme="dark"] .cm-s-mcb-dark .cm-comment { color: #7f9b78; }
html[data-theme="dark"] .cm-s-mcb-dark .cm-keyword { color: #e59cf4; }
html[data-theme="dark"] .cm-s-mcb-dark .cm-string,
html[data-theme="dark"] .cm-s-mcb-dark .cm-string-2 { color: #f2bd7b; }
html[data-theme="dark"] .cm-s-mcb-dark .cm-tag { color: #79d2a3; }
html[data-theme="dark"] .cm-s-mcb-dark .cm-attribute { color: #8dc9ff; }
html[data-theme="dark"] .cm-s-mcb-dark .cm-property { color: #d8a7f1; }
html[data-theme="dark"] .cm-s-mcb-dark .cm-number { color: #a8d98c; }
html[data-theme="dark"] .cm-s-mcb-dark .cm-def,
html[data-theme="dark"] .cm-s-mcb-dark .cm-variable { color: #c9d5df; }

html[data-theme="dark"] .CodeMirror-hints {
    color: var(--mcb-dark-text) !important;
    background: var(--mcb-dark-surface) !important;
    border-color: var(--mcb-dark-border) !important;
}

html[data-theme="dark"] .CodeMirror-hint {
    color: var(--mcb-dark-text) !important;
}

html[data-theme="dark"] li.CodeMirror-hint-active {
    background: #6a1b7a !important;
    color: #fff !important;
}

/* Statistiche: palette più morbida e coerente con il tema scuro. */
html[data-theme="dark"] .statistics-hero {
    color: #f0e6d6 !important;
    background: linear-gradient(135deg, #2c2520, #493625) !important;
    border: 1px solid #786044;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .28) !important;
}

html[data-theme="dark"] .statistics-hero h1,
html[data-theme="dark"] .statistics-hero p,
html[data-theme="dark"] .statistics-hero .statistics-kicker {
    color: #f0e6d6 !important;
}

html[data-theme="dark"] .statistics-hero p {
    opacity: .82;
}

html[data-theme="dark"] .stat-card {
    color: var(--mcb-dark-text) !important;
    background: var(--mcb-dark-surface) !important;
    border: 1px solid var(--mcb-dark-border);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .24) !important;
}

html[data-theme="dark"] .stat-card i {
    color: #d7b980 !important;
    opacity: 1;
}

html[data-theme="dark"] .stat-card--rose { border-top: 3px solid #c35b86; }
html[data-theme="dark"] .stat-card--purple { border-top: 3px solid #a962c5; }
html[data-theme="dark"] .stat-card--orange { border-top: 3px solid #cb9451; }
html[data-theme="dark"] .stat-card--blue { border-top: 3px solid #659acb; }
html[data-theme="dark"] .stat-card--green { border-top: 3px solid #74ad79; }

html[data-theme="dark"] .statistics-panel {
    border: 1px solid var(--mcb-dark-border);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .18) !important;
}

html[data-theme="dark"] .statistics-panel h2,
html[data-theme="dark"] .stat-bar__label,
html[data-theme="dark"] .stat-bar__label strong {
    color: var(--mcb-dark-text) !important;
}

html[data-theme="dark"] .visibility-grid div {
    background: #2a3037 !important;
    border: 1px solid var(--mcb-dark-border);
}

html[data-theme="dark"] .visibility-grid strong {
    color: #d7b980 !important;
}

html[data-theme="dark"] .visibility-grid span {
    color: var(--mcb-dark-muted) !important;
}

html[data-theme="dark"] .stat-bar__label span {
    color: var(--mcb-dark-muted) !important;
}

html[data-theme="dark"] .stat-bar__track {
    background: #3a424b !important;
}

html[data-theme="dark"] .stat-bar__track span {
    background: linear-gradient(90deg, #9560ad, #c5a16a) !important;
}

@media (max-width: 767px) {
    html[data-theme="dark"] .navbar .navbar-collapse {
        background: var(--mcb-dark-surface);
    }
}
