/* Shared light/dark palette for public, auth and authenticated application screens. */
:root {
    color-scheme: light;
    --theme-page: #fff;
    --theme-surface: #fff;
    --theme-surface-raised: #fff;
    --theme-text: #302638;
    --theme-muted: #756b79;
    --theme-border: #e9e2e9;
    --theme-control: #fff;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --theme-page: #17131a;
    --theme-surface: #211b24;
    --theme-surface-raised: #2a232e;
    --theme-text: #f3edf4;
    --theme-muted: #c2b6c5;
    --theme-border: #423746;
    --theme-control: #2b2430;
    --bs-body-bg: var(--theme-page);
    --bs-body-color: var(--theme-text);
    --bs-emphasis-color: #fff;
    --bs-secondary-color: #c2b6c5;
    --bs-tertiary-color: #b5a8b8;
    --bs-border-color: var(--theme-border);
    --bs-secondary-bg: var(--theme-surface);
    --bs-tertiary-bg: var(--theme-surface-raised);
    --bs-card-bg: var(--theme-surface);
    --bs-modal-bg: var(--theme-surface);
    --bs-table-color: var(--theme-text);
    --bs-table-bg: var(--theme-surface);
    --bs-form-control-bg: var(--theme-control);
    --bs-form-control-color: var(--theme-text);
    --bs-form-control-border-color: var(--theme-border);
    --bs-link-color: #f28ac9;
    --bs-link-hover-color: #ffb3df;
    --body-bg: var(--theme-page);
    --bg-one: var(--theme-surface);
    --black-color: var(--theme-text);
    --text-black: var(--theme-text);
    --para-color: var(--theme-muted);
    --colorOne: var(--theme-muted);
    --bColor: var(--theme-muted);
    --stroke-color: var(--theme-border);
    --border-color: var(--theme-border);
    --border-color-one: var(--theme-border);
    --colorThree: var(--theme-surface);
    --colorNine: var(--theme-surface-raised);
    --colorEleven: var(--theme-border);
    --post-bg: var(--theme-surface);
    --post-border: var(--theme-border);
    --post-shadow: 0 8px 24px rgba(0, 0, 0, .22);
    --post-shadow-hover: 0 12px 32px rgba(0, 0, 0, .3);
    --color-primary: #d965b0;
    --color-primary-rgb: 217, 101, 176;
    --color-text: var(--theme-text);
    --color-muted: var(--theme-muted);
    --color-divider: var(--theme-border);
    --color-badge-bg: #483b27;
    --color-badge-text: #f5d99a;
}

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

/* Application panels and common fixed white headers/surfaces. */
html[data-theme="dark"] .zMain-wrap,
html[data-theme="dark"] .zMainContent,
html[data-theme="dark"] .main-header,
html[data-theme="dark"] .main-header.bg-white,
html[data-theme="dark"] .bg-white,
html[data-theme="dark"] .bg-fafafa,
html[data-theme="dark"] .bg-f9f9f9,
html[data-theme="dark"] .bg-event-bg,
html[data-theme="dark"] .bg-one,
html[data-theme="dark"] .bg-c-white,
html[data-theme="dark"] .card,
html[data-theme="dark"] .card-body,
html[data-theme="dark"] .card-header,
html[data-theme="dark"] .card-footer,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .offcanvas,
html[data-theme="dark"] .popover,
html[data-theme="dark"] .accordion-item,
html[data-theme="dark"] .list-group-item,
html[data-theme="dark"] .table-responsive,
html[data-theme="dark"] .dataTables_wrapper,
html[data-theme="dark"] .zContent-wrap,
html[data-theme="dark"] .content-wrap,
html[data-theme="dark"] .content-wrapper {
    color: var(--theme-text);
    border-color: var(--theme-border);
    background-color: var(--theme-surface) !important;
}

html[data-theme="dark"] .bg-light,
html[data-theme="dark"] .bg-fafafa,
html[data-theme="dark"] .bg-color3,
html[data-theme="dark"] .bg-color4,
html[data-theme="dark"] .bg-color7,
html[data-theme="dark"] .bg-color9,
html[data-theme="dark"] .bg-color17,
html[data-theme="dark"] .bg-color20 {
    color: var(--theme-text) !important;
    background-color: var(--theme-surface-raised) !important;
}

/* Public site navigation and content surfaces. Brand/image sections stay intact. */
html[data-theme="dark"] .mcx3-header .mcx3-main,
html[data-theme="dark"] .mcx3-header .mcx3-nav,
html[data-theme="dark"] .mcx3-header .mcx3-mobile,
html[data-theme="dark"] .mcx3-offcanvas,
html[data-theme="dark"] .mcx3-dd,
html[data-theme="dark"] .mcx-home-news-card,
html[data-theme="dark"] .mcx-home-empty,
html[data-theme="dark"] .mcx-job-card,
html[data-theme="dark"] .frontend-content-card,
html[data-theme="dark"] .newsDetails,
html[data-theme="dark"] .noticeDetails {
    color: var(--theme-text);
    border-color: var(--theme-border);
    background-color: var(--theme-surface) !important;
}

/* Text utilities and content headings that otherwise inherit hard-coded black/grey. */
html[data-theme="dark"] :is(.text-black, .text-black-color, .text-dark, .text-1b1c17, .text-121421, .text-707070, .text-para-color, .text-707070-color, .text-muted, .text-secondary, .text-body, .fs-50.text-black-color, .header-one h1, .header-one h2, .header-one h3, .header-one h4, .header-one h5, .header-one p),
html[data-theme="dark"] .zMainContent :is(h1, h2, h3, h4, h5, h6, label, dt, dd),
html[data-theme="dark"] .zMainContent :is(.metric-label, .metric-value, .muted, .section-title),
html[data-theme="dark"] .mcx-home-news-card :is(h1, h2, h3, h4, h5, p, span, strong),
html[data-theme="dark"] .mcx-job-card :is(h1, h2, h3, h4, h5, p, span, strong) {
    color: var(--theme-text) !important;
}

html[data-theme="dark"] :is(.text-muted, .text-secondary, .text-707070, .text-para-color, .text-707070-color),
html[data-theme="dark"] .zMainContent .muted {
    color: var(--theme-muted) !important;
}

/* Form fields, editable areas and selects. */
html[data-theme="dark"] :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea, .form-control, .form-select, .primary-form-control, .note-editor.note-frame, .note-editable) {
    color: var(--theme-text);
    border-color: var(--theme-border) !important;
    background-color: var(--theme-control) !important;
}
html[data-theme="dark"] :is(input, textarea, .form-control, .form-select)::placeholder { color: #aa9eae; opacity: 1; }
html[data-theme="dark"] :is(input, select, textarea, .form-control, .form-select):focus {
    color: var(--theme-text);
    border-color: #d754a6 !important;
    background-color: var(--theme-control) !important;
}
html[data-theme="dark"] option { color: var(--theme-text); background: var(--theme-surface); }

/* Tables and table plugins, including responsive child rows. */
html[data-theme="dark"] :is(table, .table, .dataTable, .dataTables_wrapper, .dataTables_info, .dataTables_length, .dataTables_filter, .dataTables_paginate, .dataTables_processing) {
    color: var(--theme-text) !important;
    --bs-table-color: var(--theme-text);
    --bs-table-bg: var(--theme-surface);
    --bs-table-border-color: var(--theme-border);
}
html[data-theme="dark"] :is(.table, .dataTable) > :not(caption) > * > * {
    color: var(--theme-text);
    border-color: var(--theme-border);
    background-color: var(--theme-surface);
    box-shadow: inset 0 0 0 9999px var(--theme-surface);
}
html[data-theme="dark"] :is(.table-striped, .dataTable) > tbody > tr:nth-of-type(odd) > * {
    --bs-table-accent-bg: var(--theme-surface-raised);
    box-shadow: inset 0 0 0 9999px var(--theme-surface-raised);
}
html[data-theme="dark"] .table-hover > tbody > tr:hover > *,
html[data-theme="dark"] .dataTable > tbody > tr:hover > * { background-color: var(--theme-surface-raised); box-shadow: inset 0 0 0 9999px var(--theme-surface-raised); }

/* Keep DataTables pagination readable and consistent with the dark palette. */
html[data-theme="dark"] .dataTables_wrapper .dataTables_paginate {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding-top: .6rem;
    color: var(--theme-muted) !important;
}
html[data-theme="dark"] .dataTables_wrapper .dataTables_paginate > span {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}
html[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button {
    display: inline-flex;
    min-width: 35px;
    height: 35px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0 10px;
    border: 1px solid var(--theme-border);
    border-radius: 9px;
    color: var(--theme-muted) !important;
    background: var(--theme-surface-raised);
    font-size: 12px;
    line-height: 1;
    transition: color .16s ease, border-color .16s ease, background-color .16s ease, transform .16s ease;
}
html[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button:not(.disabled):not(.current):hover {
    border-color: #9d3c7e;
    color: #ffb3df !important;
    background: #382a39;
    transform: translateY(-1px);
}
html[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.current,
html[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    border-color: #b52c82;
    color: #fff !important;
    background: linear-gradient(145deg, #b52c82, #86185f);
    box-shadow: 0 4px 12px rgba(181, 44, 130, .25);
}
html[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
html[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,
html[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {
    border-color: transparent;
    color: #8d8291 !important;
    background: transparent;
    box-shadow: none;
    cursor: not-allowed;
    opacity: .7;
    transform: none;
}
html[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button:active:not(.disabled) {
    background: #6f164f;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, .25);
    transform: translateY(0);
}
html[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button:focus-visible {
    outline: 2px solid #f28ac9;
    outline-offset: 2px;
}
html[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .ellipsis {
    padding: 0 2px;
    color: var(--theme-muted);
}
@media screen and (max-width: 767px) {
    html[data-theme="dark"] .dataTables_wrapper .dataTables_paginate { justify-content: center; }
}

/* Private chat surfaces, list states, messages and composer. */
html[data-theme="dark"] .content-chat {
    --chat-surface: var(--theme-surface);
    --chat-canvas: #1d1921;
    --chat-border: var(--theme-border);
    --chat-copy: var(--theme-text);
    --chat-muted: var(--theme-muted);
    --chat-accent: #ed8ac7;
}
html[data-theme="dark"] .content-chat .content-chat-user,
html[data-theme="dark"] .content-chat .content-chat-message-user-wrap,
html[data-theme="dark"] .content-chat .chat-contact-panel,
html[data-theme="dark"] .content-chat .content-chat-message-user,
html[data-theme="dark"] .content-chat .head-chat-message-user,
html[data-theme="dark"] .content-chat .body-chat-message-user,
html[data-theme="dark"] .content-chat .footer-chat-message-user {
    color: var(--theme-text);
    border-color: var(--theme-border) !important;
    background-color: var(--theme-surface) !important;
}
html[data-theme="dark"] .content-chat .content-chat-user,
html[data-theme="dark"] .content-chat .content-chat-message-user-wrap {
    box-shadow: 0 12px 32px rgba(0, 0, 0, .16);
}
html[data-theme="dark"] .content-chat .content-chat-user .head-chat .title,
html[data-theme="dark"] .content-chat .head-chat-message-user .message-user-text .title {
    color: var(--theme-text) !important;
}
html[data-theme="dark"] .content-chat .head-chat-message-user .message-user-text .status {
    color: var(--theme-muted) !important;
}
html[data-theme="dark"] .content-chat .head-chat-message-user {
    border-bottom: 1px solid var(--theme-border) !important;
}
html[data-theme="dark"] .content-chat .chat-online-section,
html[data-theme="dark"] .content-chat .chat-contact-panel__heading,
html[data-theme="dark"] .content-chat .chat-contact-info__section {
    border-color: var(--theme-border) !important;
}
html[data-theme="dark"] .content-chat .chat-online-heading,
html[data-theme="dark"] .content-chat .chat-contact-panel__heading h3,
html[data-theme="dark"] .content-chat .chat-contact-info__name,
html[data-theme="dark"] .content-chat .chat-contact-info__section h4,
html[data-theme="dark"] .content-chat .chat-contact-info__row strong {
    color: var(--theme-text) !important;
}
html[data-theme="dark"] .content-chat .chat-online-count,
html[data-theme="dark"] .content-chat .chat-contact-panel__heading i,
html[data-theme="dark"] .content-chat .chat-contact-info__status,
html[data-theme="dark"] .content-chat .chat-contact-info__row span,
html[data-theme="dark"] .content-chat .chat-contact-empty {
    color: var(--theme-muted) !important;
}
html[data-theme="dark"] .content-chat .chat-contact-info__profile-link {
    border-color: #5b465a;
    color: #f5a3d3;
    background: var(--theme-surface-raised);
}
html[data-theme="dark"] .content-chat .chat-contact-info__profile-link:hover {
    border-color: #a64b88;
    background: #382a39;
}
html[data-theme="dark"] .content-chat .chat-contact-info__avatar,
html[data-theme="dark"] .content-chat .chat-contact-info__online {
    border-color: var(--theme-surface);
}
html[data-theme="dark"] .content-chat .chat-tabs {
    border-bottom-color: var(--theme-border) !important;
}
html[data-theme="dark"] .content-chat .chat-tabs .nav-link {
    border: 1px solid transparent !important;
    color: var(--theme-muted) !important;
    background: transparent !important;
}
html[data-theme="dark"] .content-chat .chat-tabs .nav-link:hover,
html[data-theme="dark"] .content-chat .chat-tabs .nav-link.active {
    color: #f5a3d3 !important;
}
html[data-theme="dark"] .content-chat .chat-tabs .nav-link.active {
    border-color: #554356 !important;
    background: var(--theme-surface-raised) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .2) !important;
}
html[data-theme="dark"] .content-chat .content-chat-user .head-chat .chat-compose-btn {
    border-color: #554356 !important;
    color: #f5a3d3 !important;
    background: var(--theme-surface-raised) !important;
    box-shadow: none;
}
html[data-theme="dark"] .content-chat .content-chat-user .head-chat .chat-compose-btn:hover {
    border-color: #a64b88 !important;
    color: #fff !important;
    background: #74385f !important;
}
html[data-theme="dark"] .content-chat .search-two input {
    border-color: var(--theme-border) !important;
    color: var(--theme-text) !important;
    background: var(--theme-control) !important;
}
html[data-theme="dark"] .content-chat .search-two input:focus {
    border-color: #bc5b9c !important;
    box-shadow: 0 0 0 3px rgba(188, 91, 156, .16);
}
html[data-theme="dark"] .content-chat .search-two .icon img {
    filter: brightness(0) invert(.78);
}
html[data-theme="dark"] .content-chat .list-search-user-chat {
    scrollbar-color: #5d4a60 transparent;
}
html[data-theme="dark"] .content-chat .list-search-user-chat::-webkit-scrollbar-thumb,
html[data-theme="dark"] .content-chat .body-chat-message-user::-webkit-scrollbar-thumb {
    background: #5d4a60;
}
html[data-theme="dark"] .content-chat .list-search-user-chat .user-chat {
    border-color: transparent !important;
    background: transparent !important;
}
html[data-theme="dark"] .content-chat .list-search-user-chat .user-chat:not(.active):hover {
    border-color: var(--theme-border) !important;
    background: var(--theme-surface-raised) !important;
}
html[data-theme="dark"] .content-chat .list-search-user-chat .user-chat.active {
    border-color: #75466b !important;
    background: linear-gradient(135deg, #503249, #3b293c) !important;
    box-shadow: inset 3px 0 0 #ed8ac7;
}
html[data-theme="dark"] .content-chat .list-search-user-chat .user-chat .user-chat-img img {
    border: 2px solid var(--theme-border);
}
html[data-theme="dark"] .content-chat .list-search-user-chat .user-chat .user-chat-img .online,
html[data-theme="dark"] .content-chat .list-search-user-chat .user-chat .user-chat-img .offline {
    border-color: var(--theme-surface) !important;
}
html[data-theme="dark"] .content-chat .list-search-user-chat .user-chat .user-chat-text .name {
    color: var(--theme-text) !important;
}
html[data-theme="dark"] .content-chat .list-search-user-chat .user-chat .user-chat-text small,
html[data-theme="dark"] .content-chat .list-search-user-chat .user-chat .user-chat-time .time {
    color: var(--theme-muted) !important;
}
html[data-theme="dark"] .content-chat .list-search-user-chat .user-chat .user-chat-time .notify {
    color: #fff !important;
    background: #a33d81 !important;
}
html[data-theme="dark"] .content-chat .list-search-user-chat .user-chat.active .user-chat-text .name {
    color: #fff !important;
}
html[data-theme="dark"] .content-chat .list-search-user-chat .user-chat.active .user-chat-text small,
html[data-theme="dark"] .content-chat .list-search-user-chat .user-chat.active .user-chat-time .time {
    color: #f4c5e1 !important;
}
html[data-theme="dark"] .content-chat .list-search-user-chat .user-chat.active .user-chat-time .notify {
    color: #572846 !important;
    background: #f4c5e1 !important;
}
html[data-theme="dark"] .content-chat .body-chat-message-user {
    background: linear-gradient(180deg, var(--theme-surface), #1d1921) !important;
}
html[data-theme="dark"] .content-chat .body-chat-message-user .message-user-left .text {
    border-color: #453849 !important;
    color: var(--theme-text) !important;
    background: #302735 !important;
}
html[data-theme="dark"] .content-chat .body-chat-message-user .message-user-right .text {
    border-color: #68415c !important;
    color: #f7edf4 !important;
    background: #472b40 !important;
}
html[data-theme="dark"] .content-chat .body-chat-message-user .message-user-left .text > p,
html[data-theme="dark"] .content-chat .body-chat-message-user .message-user-right .text > p {
    color: inherit !important;
}
html[data-theme="dark"] .content-chat .body-chat-message-user .time-read .time {
    color: #c9bacb !important;
}
html[data-theme="dark"] .content-chat #single-chat-wrapper .body-chat-message-user .chat-message-meta__time {
    color: #c9bacb;
}
html[data-theme="dark"] .content-chat .body-chat-message-user .time-read svg path {
    fill: #c9bacb !important;
}
html[data-theme="dark"] .content-chat #single-chat-wrapper .body-chat-message-user .chat-message-meta__receipt {
    color: #c9bacb;
}
html[data-theme="dark"] .content-chat .body-chat-message-user .time-read .fill-green svg path {
    fill: #73d9ae !important;
}
html[data-theme="dark"] .content-chat #single-chat-wrapper .body-chat-message-user .chat-message-meta__receipt.is-read {
    color: #73d9ae;
}
html[data-theme="dark"] .content-chat .footer-chat-message-user {
    border-top: 1px solid var(--theme-border) !important;
}
html[data-theme="dark"] .content-chat .footer-chat-message-user .footer-inputs {
    border-color: var(--theme-border);
    background: var(--theme-control);
}
html[data-theme="dark"] .content-chat .footer-chat-message-user .message-user-send input {
    border: 1px solid var(--theme-border) !important;
    color: var(--theme-text) !important;
    background: var(--theme-control) !important;
}
html[data-theme="dark"] .content-chat .footer-chat-message-user .message-user-send input::placeholder {
    color: #aa9eae !important;
}
html[data-theme="dark"] .content-chat .footer-chat-message-user .atta-btn label,
html[data-theme="dark"] .content-chat .footer-chat-message-user .send-btn {
    border: 1px solid var(--theme-border) !important;
    background: var(--theme-surface-raised) !important;
}
html[data-theme="dark"] .content-chat .footer-chat-message-user .send-btn {
    border-color: #a33d81 !important;
    background: #a33d81 !important;
}
html[data-theme="dark"] .content-chat .footer-chat-message-user .atta-btn label:hover,
html[data-theme="dark"] .content-chat .footer-chat-message-user .send-btn:hover {
    border-color: #d36bab !important;
    background: #74385f !important;
}
html[data-theme="dark"] .content-chat .footer-chat-message-user .atta-btn img,
html[data-theme="dark"] .content-chat .footer-chat-message-user .send-btn img {
    filter: brightness(0) invert(1);
}
html[data-theme="dark"] .content-chat #files-names .file-block {
    border-color: var(--theme-border);
    color: var(--theme-text);
    background: var(--theme-surface-raised);
}
html[data-theme="dark"] .content-chat :is(button, input):focus-visible {
    outline: 2px solid #f28ac9;
    outline-offset: 2px;
}

/* Dialogs, navigation menus, editors and alerts. */
html[data-theme="dark"] :is(.modal-header, .modal-footer, .dropdown-header, .list-group, .accordion-button, .note-toolbar, .note-statusbar) {
    color: var(--theme-text);
    border-color: var(--theme-border);
    background-color: var(--theme-surface-raised) !important;
}
html[data-theme="dark"] .accordion-button:not(.collapsed) { color: #f28ac9; }
html[data-theme="dark"] :is(.dropdown-item, .list-group-item-action) { color: var(--theme-text); }
html[data-theme="dark"] :is(.dropdown-item, .list-group-item-action):hover,
html[data-theme="dark"] :is(.dropdown-item, .list-group-item-action):focus { color: #fff; background-color: #493347; }
html[data-theme="dark"] :is(.alert-light, .alert-secondary, .alert-info) { color: var(--theme-text); border-color: var(--theme-border); background-color: var(--theme-surface-raised); }
html[data-theme="dark"] :is(.cookie-consent-wrap, .js-cookie-consent, .toast, .toast-header, .select2-dropdown, .select2-results__option, .daterangepicker, .flatpickr-calendar, .input-group-text) {
    color: var(--theme-text);
    border-color: var(--theme-border);
    background-color: var(--theme-surface-raised) !important;
}
html[data-theme="dark"] .select2-container--default .select2-selection--single,
html[data-theme="dark"] .select2-container--default .select2-selection--multiple { color: var(--theme-text); border-color: var(--theme-border); background: var(--theme-control); }
html[data-theme="dark"] .select2-container--default .select2-results__option--selected { background: #493347; }
html[data-theme="dark"] :is(.page-link, .breadcrumb, .nav-tabs, .nav-tabs .nav-link) { color: var(--theme-text); border-color: var(--theme-border); background-color: var(--theme-surface); }
html[data-theme="dark"] .page-link:hover,
html[data-theme="dark"] .nav-tabs .nav-link:hover { color: #ff9bd2; background-color: var(--theme-surface-raised); }
html[data-theme="dark"] :is(.form-check-input, .custom-control-input) { border-color: #766579; background-color: var(--theme-control); }
html[data-theme="dark"] .form-check-input:checked { border-color: #b52c82; background-color: #b52c82; }
html[data-theme="dark"] .flatpickr-day { color: var(--theme-text); }
html[data-theme="dark"] .flatpickr-day:hover { background: #493347; border-color: #493347; }
html[data-theme="dark"] .flatpickr-day.selected { color: #fff; background: #a31672; border-color: #a31672; }

/* Ticket QR/barcode must keep a light backing so scanners can read it in dark mode. */
html[data-theme="dark"] #ticketViewModal .ticket-view .right :is(.qr, .bar-code) {
    padding: 10px;
    border-radius: 8px;
    background: #fff;
    color: #17131a;
}

/* Alumni feed, posts, comments and upload previews use several legacy hard-coded colors. */
html[data-theme="dark"] .post-card {
    color: var(--theme-text);
    border-color: var(--theme-border);
    background: var(--theme-surface) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
}
html[data-theme="dark"] .post-card:hover { box-shadow: 0 12px 32px rgba(0, 0, 0, .3); }
html[data-theme="dark"] .post-card .post-text,
html[data-theme="dark"] .post-card .post-main-body > p { color: var(--theme-text) !important; }
html[data-theme="dark"] .post-card :is(.post-body, .post-main-body, .post-footer-actions) { border-color: var(--theme-border) !important; }
html[data-theme="dark"] .post-card :is(.post-options-btn, .post-action-btn, .postLike) { color: var(--theme-muted); }
html[data-theme="dark"] .post-card :is(.post-options-btn:hover, .post-action-btn:hover) { color: #f5b2da; background: #382a39; }
html[data-theme="dark"] .post-card .post-options .dropdown-item-btn { color: var(--theme-text); }
html[data-theme="dark"] .post-card .post-options .dropdown-item-btn:hover { color: #f5b2da; background: #382a39; }
html[data-theme="dark"] .post-card .post-gallery li { background: #302733; }
html[data-theme="dark"] .post-card .post-comment-input {
    color: var(--theme-text) !important;
    border-color: var(--theme-border) !important;
    background: var(--theme-control) !important;
}
html[data-theme="dark"] .post-card .post-comment-input:focus { background: var(--theme-control) !important; }
html[data-theme="dark"] .post-card .post-comment-input::placeholder { color: #aa9eae !important; }
html[data-theme="dark"] .post-card .post-comment-submit-btn { color: #fff; border-color: #9d347b; background: #9d347b; }
html[data-theme="dark"] .post-card .post-comment-submit-btn:hover,
html[data-theme="dark"] .post-card .post-comment-submit-btn:focus { border-color: #b54a92; background: #b54a92; }
html[data-theme="dark"] .post-card .post-reply-note { color: var(--theme-text); background: var(--theme-surface-raised); }
html[data-theme="dark"] .post-card .post-comment-avatar { background: #302733; }
html[data-theme="dark"] .post-card .postComments .comment-data > div:first-child { border-color: var(--theme-border); background: var(--theme-surface-raised) !important; }
html[data-theme="dark"] .post-card .postComments .comment-data > div:first-child :is(h4, p) { color: var(--theme-text) !important; }
html[data-theme="dark"] .post-card .postComments .comment-data > div:nth-child(2) :is(button, p) { color: var(--theme-muted) !important; }
html[data-theme="dark"] .post-card .postComments .postCommentReply { border-color: var(--theme-border); }
html[data-theme="dark"] .post-card .postComments svg :is(path, circle) { stroke: var(--theme-muted) !important; }
html[data-theme="dark"] .post-card .postLike svg path { stroke: currentColor !important; }
html[data-theme="dark"] .post-card .postLike:hover,
html[data-theme="dark"] .post-card .postLike.active { color: #f28ac9 !important; }
html[data-theme="dark"] .post-card .postLike:hover svg path,
html[data-theme="dark"] .post-card .postLike.active svg path { fill: #f28ac9 !important; stroke: #f28ac9 !important; }
html[data-theme="dark"] .post-card .post-comment-button img { filter: brightness(0) invert(.82); }
html[data-theme="dark"] .post-card .comment-submit-loader { color: var(--theme-muted); }
html[data-theme="dark"] .custom-modal .custom-modal-header { border-color: var(--theme-border); background: var(--theme-surface-raised); }
html[data-theme="dark"] .custom-modal .custom-modal-title { color: var(--theme-text); }
html[data-theme="dark"] .custom-modal .btn-close { filter: invert(1) grayscale(1); }
html[data-theme="dark"] .post-creator-submit { color: #fff !important; background: #9d347b !important; }
html[data-theme="dark"] .home-container .card-block,
html[data-theme="dark"] #homeRightSideView .card-block {
    color: var(--theme-text);
    border-color: var(--theme-border);
    background: var(--theme-surface) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}
html[data-theme="dark"] #homeRightSideView { background: var(--theme-page) !important; }
html[data-theme="dark"] #homeRightSideView .offcanvas-body { background: var(--theme-page); }
html[data-theme="dark"] :is(#files-names, #files-names2) .file-block { color: var(--theme-text); border-color: var(--theme-border); background: var(--theme-surface-raised); }
html[data-theme="dark"] :is(#files-names, #files-names2) .file-block .name { color: var(--theme-text) !important; }

/* Match the header action buttons to the dark panel instead of leaving white circles. */
html[data-theme="dark"] .platform-main-header .item-one {
    border-color: var(--theme-border);
    background-color: var(--theme-surface-raised);
}
html[data-theme="dark"] .platform-main-header .item-one img { filter: brightness(0) invert(.88); }
html[data-theme="dark"] .platform-main-header .notify_no { color: #fff; }
html[data-theme="dark"] .platform-main-header .headerUserDropdown .dropdown-toggle::after { color: var(--theme-muted); }
html[data-theme="dark"] .platform-main-header .mobileMenu button,
html[data-theme="dark"] .platform-main-header__right > .d-md-none {
    color: var(--theme-text) !important;
    border-color: var(--theme-border) !important;
    background-color: var(--theme-surface-raised) !important;
}
html[data-theme="dark"] .platform-main-header__right > .d-md-none img { filter: brightness(0) invert(.88); }

/* The shared no-image asset is light; dim only this fallback in dark mode. */
html[data-theme="dark"] img[src*="no-image.jpg"],
html[data-theme="dark"] img[src*="no-image.png"] { filter: brightness(.34) saturate(.75); }

/* Loading placeholders and persistent mobile member navigation. */
html[data-theme="dark"] .panel-navigation-skeleton,
html[data-theme="dark"] .feed-page-skeleton { color: var(--theme-muted); background: var(--theme-page); }
html[data-theme="dark"] .panel-navigation-skeleton__shape {
    background: linear-gradient(100deg, #302a35 20%, #443849 38%, #302a35 56%);
    background-size: 220% 100%;
}
html[data-theme="dark"] .panel-navigation-skeleton__shape::after { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .08), transparent); }
html[data-theme="dark"] :is(.panel-navigation-skeleton__metric, .panel-navigation-skeleton__panel, .panel-navigation-skeleton__table, .feed-page-skeleton__card) {
    border-color: var(--theme-border);
    background: var(--theme-surface);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}
html[data-theme="dark"] :is(.panel-navigation-skeleton__header, .panel-navigation-skeleton__chart-area, .panel-navigation-skeleton__activity-row, .panel-navigation-skeleton__table-head, .panel-navigation-skeleton__table-row, .feed-page-skeleton__header, .feed-page-skeleton__composer-actions, .feed-page-skeleton__post-actions) { border-color: var(--theme-border); }
html[data-theme="dark"] .panel-navigation-skeleton__chart-area { background: repeating-linear-gradient(to bottom, transparent 0, transparent 34px, #382f3b 35px, transparent 36px); }
html[data-theme="dark"] .panel-navigation-skeleton__table-head { background: #2a232e; }
html[data-theme="dark"] .member-mobile-bottom-nav {
    border-color: rgba(235, 215, 232, .12);
    background: rgba(33, 27, 36, .96);
    box-shadow: 0 -8px 28px rgba(0, 0, 0, .28);
}
html[data-theme="dark"] .member-mobile-bottom-nav__item { color: var(--theme-muted); }
html[data-theme="dark"] .member-mobile-bottom-nav__item.is-active { color: #ff9bd2; }
html[data-theme="dark"] .member-mobile-bottom-nav__item.is-active::before { background: #f075bd; }
html[data-theme="dark"] .member-mobile-bottom-nav__item:focus-visible { outline-color: #ff9bd2; }

html[data-theme="dark"] hr,
html[data-theme="dark"] .bd-one,
html[data-theme="dark"] [class*="bd-c-"] { border-color: var(--theme-border) !important; }
html[data-theme="dark"] .text-decoration-underline { text-decoration-color: #c6a4bd; }

/* Auth screens share the selector with the same persisted preference. */
html[data-theme="dark"] body.auth-ui {
    color: var(--theme-text) !important;
    background: radial-gradient(ellipse at 8% 12%, rgba(107, 42, 87, .28), transparent 32%), #17131a !important;
}
html[data-theme="dark"] .auth-ui .register-wrap,
html[data-theme="dark"] .auth-ui .register-right,
html[data-theme="dark"] .auth-ui .register-form,
html[data-theme="dark"] .auth-ui .form-wrap-main,
html[data-theme="dark"] .auth-ui .primary-form {
    color: var(--theme-text) !important;
    border-color: var(--theme-border) !important;
    background: var(--theme-surface) !important;
}
html[data-theme="dark"] .auth-ui .register-left { background-color: #36142f; }
html[data-theme="dark"] .auth-ui :is(h1, h2, h3, h4, h5, h6, p, label, .form-label, .auth-title, .auth-subtitle, .auth-description) { color: var(--theme-text); }
html[data-theme="dark"] .auth-ui .auth-muted,
html[data-theme="dark"] .auth-ui .auth-description { color: var(--theme-muted) !important; }
html[data-theme="dark"] .auth-ui .primary-form-control { color: var(--theme-text) !important; border-color: var(--theme-border) !important; background: var(--theme-control) !important; }
html[data-theme="dark"] .auth-ui .primary-form-control:focus { background: var(--theme-control) !important; }
html[data-theme="dark"] .auth-ui .auth-password-toggle { color: var(--theme-muted); }
html[data-theme="dark"] .auth-ui .form-label { background: transparent !important; }

/* Full-page loading overlays are disabled; feedback must stay close to its action. */
#ajax-loader,
.ajax-loader,
#preloader {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}
html[data-theme="dark"] .auth-ui .auth-eyebrow { border-color: #68415f; background: linear-gradient(110deg, #3d293c, #30283b); }
html[data-theme="dark"] .auth-ui .auth-eyebrow > span:not(.auth-eyebrow__spark) { color: #f4c8e3; }
html[data-theme="dark"] .auth-ui .continue-btn { color: var(--theme-text) !important; border-color: var(--theme-border) !important; background: var(--theme-surface-raised) !important; }

/* The public navigation has its own palette in its Blade partial. */
html[data-theme="dark"] {
    --ink: #f3edf4;
    --muted: #c2b6c5;
    --bd: rgba(228, 209, 227, .16);
    --sh: 0 16px 36px rgba(0, 0, 0, .28);
    --sh2: 0 10px 22px rgba(0, 0, 0, .2);
}
html[data-theme="dark"] .mcx3-nav { border-color: var(--theme-border) !important; background: var(--theme-surface) !important; box-shadow: 0 8px 24px rgba(0, 0, 0, .22) !important; }
html[data-theme="dark"] .mcx3-brand { border-color: var(--theme-border); background: var(--theme-surface) !important; }
html[data-theme="dark"] .mcx3-title { color: var(--theme-text) !important; }
html[data-theme="dark"] .mcx3-sub { color: var(--theme-muted) !important; }
html[data-theme="dark"] .mcx3-chip { border-color: var(--theme-border); color: var(--theme-text); background: var(--theme-surface-raised); box-shadow: none; }
html[data-theme="dark"] .mcx3-chip-ic { color: #fff; }
html[data-theme="dark"] .mcx3-logo-fallback { border-color: #54394f; background: #392b39; color: #f28ac9; }
html[data-theme="dark"] .mcx3-link { color: var(--theme-text) !important; }
html[data-theme="dark"] .mcx3-link:hover,
html[data-theme="dark"] .mcx3-link.active { color: #ff9bd2 !important; background: #3a2938 !important; }
html[data-theme="dark"] .mcx3-link-cta { color: #fff !important; background: #4b2940 !important; }
html[data-theme="dark"] .mcx3-btn:not(.mcx3-btn-pink) { color: var(--theme-text) !important; border-color: var(--theme-border); background: var(--theme-surface-raised); }
html[data-theme="dark"] .mcx3-btn-outline,
html[data-theme="dark"] .mcx3-btn-ghost { color: #ff9bd2 !important; }
html[data-theme="dark"] .mcx3-toggler,
html[data-theme="dark"] .mcx3-offclose { border-color: var(--theme-border); background: var(--theme-surface-raised); }
html[data-theme="dark"] .mcx3-burger,
html[data-theme="dark"] .mcx3-burger::before,
html[data-theme="dark"] .mcx3-burger::after { background: var(--theme-text); }
html[data-theme="dark"] .mcx3-header .mcx3-offhead,
html[data-theme="dark"] .mcx3-header .mcx3-offfoot { border-color: var(--theme-border); }

html[data-theme="dark"] :is(.skeleton, .skeleton-line, .skeleton-circle, .skeleton-card, [data-skeleton]) {
    background-color: #342b37;
    background-image: linear-gradient(90deg, #342b37, #443748, #342b37);
}

/* Respect intentionally colored brand buttons and media, while neutralizing white utility buttons. */
html[data-theme="dark"] :is(.btn-light, .btn-white, .bg-white.text-dark, .bg-white.text-black, .btn-icon.bg-light) {
    color: var(--theme-text) !important;
    border-color: var(--theme-border) !important;
    background-color: var(--theme-surface-raised) !important;
}
html[data-theme="dark"] .bg-1b1c17 { background-color: var(--theme-surface-raised) !important; }
html[data-theme="dark"] .zBtn-filter[aria-expanded="true"],
html[data-theme="dark"] .zBtn-filter:hover { background-color: var(--theme-surface-raised) !important; }
html[data-theme="dark"] .modal-backdrop { background-color: #000 !important; }
html[data-theme="dark"] .zTabHead .nav-link.active::after { background-color: #f28ac9; }
html[data-theme="dark"] .apexcharts-text { fill: var(--theme-text) !important; }
html[data-theme="dark"] .apexcharts-gridline { stroke: var(--theme-border) !important; }
html[data-theme="dark"] :is(.apexcharts-tooltip, .apexcharts-menu, .apexcharts-xaxistooltip, .apexcharts-yaxistooltip) {
    color: var(--theme-text) !important;
    border-color: var(--theme-border) !important;
    background: var(--theme-surface-raised) !important;
}
html[data-theme="dark"] .apexcharts-tooltip :is(.apexcharts-tooltip-title, .apexcharts-tooltip-text-y-label, .apexcharts-tooltip-text-y-value) { color: var(--theme-text) !important; }
html[data-theme="dark"] ::selection { color: #fff; background: #9f3479; }
html[data-theme="dark"] ::-webkit-scrollbar-track { background: #1b161e; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #5b495d; }

/* The control is appended to panel navigation or floats on public/auth pages. */
.platform-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 40px;
    min-height: 40px;
    padding: 0 11px;
    border: 1px solid #e8dce7;
    border-radius: 999px;
    color: #59364f;
    background: #fff;
    box-shadow: 0 3px 12px rgba(47, 26, 45, .1);
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.platform-theme-toggle:hover { border-color: #c85a9b; color: #8c1f68; transform: translateY(-1px); }
.platform-theme-toggle svg { display: block; width: 17px; height: 17px; flex: 0 0 17px; }
.platform-theme-toggle[hidden] { display: none !important; }
.platform-theme-toggle--floating { position: fixed; z-index: 1045; right: 20px; bottom: 82px; }
.platform-theme-toggle--nav { flex: 0 0 auto; margin-left: 4px; }
.platform-theme-toggle--nav .platform-theme-toggle__label { display: none; }
.platform-main-header .platform-theme-toggle--nav {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    padding: 0;
    border-radius: 50%;
    box-shadow: none;
}
html[data-theme="dark"] .platform-theme-toggle { border-color: #514352; color: #f7e9f3; background: #302733; box-shadow: 0 4px 14px rgba(0, 0, 0, .28); }
html[data-theme="dark"] .platform-theme-toggle:hover { border-color: #ce69a7; color: #fff; background: #443346; }
html[data-theme="dark"] .platform-theme-toggle--nav { border-color: transparent; background: transparent; box-shadow: none; }
html[data-theme="dark"] .platform-theme-toggle--nav:hover { background: #493347; }
html[data-theme="dark"] .platform-main-header .platform-theme-toggle--nav {
    border-color: var(--theme-border);
    background: var(--theme-surface-raised);
    box-shadow: none;
}
html[data-theme="dark"] .platform-main-header .platform-theme-toggle--nav:hover { background: #493347; }
body.mcx-cookie-banner-visible .platform-theme-toggle--floating { bottom: 190px; }
@media (max-width: 1023px) {
    .platform-main-header .platform-theme-toggle--nav {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
    }
}
@media (max-width: 575.98px) {
    .platform-theme-toggle--floating { right: 14px; bottom: 74px; min-height: 42px; }
    body.mcx-cookie-banner-visible .platform-theme-toggle--floating { bottom: 190px; }
}
@media (max-width: 420px) {
    .platform-main-header .platform-theme-toggle--nav {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        margin-left: 0;
    }
    .platform-main-header .platform-theme-toggle--nav svg { width: 16px; height: 16px; flex-basis: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .platform-theme-toggle { transition: none; }
}

/* Account, member card and settings surfaces. */
html[data-theme="dark"] .rmc-plan-card {
    border-color: var(--theme-border);
    background: var(--theme-surface);
    color: var(--theme-text);
}
html[data-theme="dark"] .rmc-plan-card:hover { border-color: rgba(244, 114, 182, .52); }
html[data-theme="dark"] .rmc-plan-card--featured { border-color: #e35ba9; }
html[data-theme="dark"] .rmc-plan-name,
html[data-theme="dark"] .rmc-plan-price { color: var(--theme-text); }
html[data-theme="dark"] .rmc-plan-duration,
html[data-theme="dark"] .rmc-plan-feature-item { color: var(--theme-muted); }
html[data-theme="dark"] .rmc-plan-divider { background: var(--theme-border); }
html[data-theme="dark"] .rmc-plan-icon { background: rgba(244, 114, 182, .14); color: #ff9fd5; }
html[data-theme="dark"] .rmc-plan-card--featured .rmc-plan-icon { background: #c2308e; color: #fff; }
html[data-theme="dark"] .rmc-plan-feature-check { background: rgba(244, 114, 182, .14); color: #ff9fd5; }
html[data-theme="dark"] .rmc-plan-card--featured .rmc-plan-feature-check { background: #c2308e; color: #fff; }
html[data-theme="dark"] .rmc-plan-cta { border-color: #e35ba9; color: #ff9fd5; }
html[data-theme="dark"] .rmc-plan-cta:hover { background: rgba(227, 91, 169, .12); color: #ffb3dc; }
html[data-theme="dark"] .rmc-plan-cta--primary { border-color: #c2308e; background: #c2308e; color: #fff !important; }
html[data-theme="dark"] .rmc-plan-card.card-locked { border-color: var(--theme-border) !important; background: var(--theme-surface-raised); }
html[data-theme="dark"] .rmc-plan-card.card-locked .rmc-plan-cta { border-color: var(--theme-border) !important; background: var(--theme-surface-raised) !important; color: var(--theme-muted) !important; }
html[data-theme="dark"] .rmc-plan-card.card-locked::after { color: var(--theme-muted); }
html[data-theme="dark"] .securityList > li { border-color: var(--theme-border); }
html[data-theme="dark"] .zTabContent { color: var(--theme-text); }
html[data-theme="dark"] .zTabHead { border-color: var(--theme-border); }
html[data-theme="dark"] .zTabHead .nav-link { color: var(--theme-muted); }
html[data-theme="dark"] .zTabHead .nav-link.active { color: var(--theme-text); }
html[data-theme="dark"] .bg-f9f9f9 { background-color: var(--theme-surface-raised) !important; }
html[data-theme="dark"] .securityList .zBtn-one {
    border: 1px solid var(--theme-border);
    background: var(--theme-surface-raised);
    color: var(--theme-text);
}
html[data-theme="dark"] .securityList .zBtn-one.active {
    border-color: #c2308e;
    background: #c2308e;
    color: #fff;
}
html[data-theme="dark"] .securityList .zBtn-one:disabled { color: var(--theme-muted); opacity: .75; }

/* Public information site: page sections and custom cards that use fixed light colors. */
html[data-theme="dark"] body#page-top {
    --ink: var(--theme-text);
    --muted: var(--theme-muted);
    --bd: var(--theme-border);
    --sh: 0 16px 36px rgba(0, 0, 0, .24);
    --sh2: 0 10px 22px rgba(0, 0, 0, .2);
    --cinza-escuro: var(--theme-text);
    --cinza-medio: var(--theme-muted);
    --cinza-claro: var(--theme-surface-raised);
    --cinza-muito-claro: var(--theme-surface-raised);
    color: var(--theme-text);
    background-color: var(--theme-page) !important;
}

html[data-theme="dark"] body#page-top #main-content {
    color: var(--theme-text);
    background-color: var(--theme-page);
}

html[data-theme="dark"] body#page-top #main-content :is(
    .joinCommunity-section,
    .mcx-aboutpro5,
    .mcx-home-stories,
    .mcx-members-section,
    .mcx-gallerypro8,
    .mcx-home-opportunities,
    .mcx-home-news,
    .sponsors-page,
    .sponsors-section,
    .contact-cta-section,
    .partnership-packages-page
) {
    color: var(--theme-text);
    background-color: var(--theme-page) !important;
}

html[data-theme="dark"] body#page-top #main-content :is(
    .joinCommunity-wrap .item,
    .mcx-aboutpro5__card,
    .mcx-home-stories .stories-list > li,
    .mcx-home-stat,
    .mcx-member-card,
    .mcx-home-job-card,
    .mcx-home-news-card,
    .mcx-home-empty,
    .contact-info-card,
    .contact-form-wrapper,
    .policy-content-wrapper,
    .sponsors-page .card,
    .sponsors-page .contact-card,
    .sponsor-logo-container,
    .pp-card,
    .pp-info-card
) {
    color: var(--theme-text);
    border-color: var(--theme-border) !important;
    background: var(--theme-surface) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .2);
}

html[data-theme="dark"] body#page-top #main-content :is(
    .mcx-home-stat h4,
    .mcx-member-info h4,
    .mcx-job-card__title,
    .mcx-home-empty strong,
    .mcx-aboutpro5__title,
    .mcx-aboutpro5__fh,
    .mcx-gallerypro8__title,
    .mcx-gallerypro8__kicker,
    .contact-info-card h3,
    .contact-info-card h4,
    .contact-info-card h5,
    .contact-form-wrapper h3,
    .policy-content-wrapper h1,
    .policy-content-wrapper h2,
    .policy-content-wrapper h3,
    .policy-content-wrapper h4,
    .sponsors-page .card-title,
    .sponsors-page .contact-card h2,
    .pp-card :is(h1, h2, h3, h4, h5, h6)
) {
    color: var(--theme-text) !important;
}

html[data-theme="dark"] body#page-top #main-content :is(
    .mcx-aboutpro5__lead,
    .mcx-aboutpro5__fs,
    .mcx-home-stat p,
    .mcx-member-info p,
    .mcx-job-card__company-copy strong,
    .mcx-job-card__description,
    .mcx-job-card__location,
    .mcx-home-empty p,
    .contact-info-card p,
    .contact-info-card a,
    .contact-form-wrapper > p,
    .contact-form .form-label,
    .policy-content-wrapper p,
    .policy-content-wrapper li,
    .sponsors-page .card-text,
    .sponsors-page .contact-card p,
    .pp-card p
) {
    color: var(--theme-muted) !important;
}

html[data-theme="dark"] body#page-top #main-content :is(
    .mcx-home-stories .stories-list > li,
    .mcx-home-stat,
    .mcx-member-card,
    .mcx-home-job-card,
    .mcx-home-news-card,
    .mcx-home-empty
) { border-color: var(--theme-border) !important; }

html[data-theme="dark"] body#page-top #main-content .mcx-home-stat {
    background: linear-gradient(155deg, var(--theme-surface), var(--theme-surface-raised)) !important;
}

html[data-theme="dark"] body#page-top #main-content .mcx-members-section {
    background: linear-gradient(180deg, var(--theme-page), var(--theme-surface)) !important;
}

html[data-theme="dark"] body#page-top #main-content .mcx-home-empty {
    background: linear-gradient(135deg, var(--theme-surface), var(--theme-surface-raised)) !important;
}

html[data-theme="dark"] body#page-top #main-content .mcx-gallerypro8 {
    background:
        radial-gradient(1100px 520px at 50% -10%, rgba(217, 101, 176, .09), transparent 60%),
        linear-gradient(180deg, var(--theme-page) 0%, var(--theme-page) 60%, var(--theme-surface) 100%) !important;
}

html[data-theme="dark"] body#page-top #main-content .mcx-gallerypro8__kicker {
    border-color: var(--theme-border);
    color: var(--theme-text) !important;
    background: rgba(255, 255, 255, .06);
}

html[data-theme="dark"] body#page-top #main-content .mcx-gallerypro8__btn {
    border-color: var(--theme-border);
    color: var(--theme-text);
    background: rgba(42, 35, 46, .96);
}

html[data-theme="dark"] body#page-top #main-content .mcx-gallerypro8__btn:hover {
    border-color: #9d347b;
    background: #382a39;
}

html[data-theme="dark"] body#page-top #main-content .mcx-gallerypro8__progress {
    border-color: var(--theme-border);
    background: var(--theme-surface-raised);
}

html[data-theme="dark"] body#page-top #main-content .mcx-aboutpro5__pill:not(.mcx-aboutpro5__pill--rosa) {
    border-color: var(--theme-border);
    color: var(--theme-text);
    background: var(--theme-surface-raised);
}

html[data-theme="dark"] body#page-top #main-content .mcx-aboutpro5__capTx { color: var(--theme-muted); }

html[data-theme="dark"] body#page-top #main-content .mcx-job-card__type {
    border-color: rgba(242, 138, 201, .28);
    color: #ffadd7;
    background: rgba(190, 24, 93, .2);
}

html[data-theme="dark"] body#page-top #main-content .mcx-job-card__mark img,
html[data-theme="dark"] body#page-top #main-content .sponsor-logo-container {
    background-color: var(--theme-surface-raised) !important;
}

/* Keep the newsletter readable over its decorative image in both themes. */
html[data-theme="dark"] body#page-top .mcx4-newsletter__card {
    --ink: var(--theme-text);
    --muted: var(--theme-muted);
    color: var(--theme-text);
    border-color: var(--theme-border);
    background-color: var(--theme-surface-raised) !important;
}

html[data-theme="dark"] body#page-top .mcx4-newsletter__card::before {
    background: linear-gradient(180deg, rgba(33, 27, 36, .9), rgba(33, 27, 36, .96));
}

html[data-theme="dark"] body#page-top .mcx4-newsletter__field {
    border-color: var(--theme-border);
    background: rgba(43, 36, 48, .96);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .24);
}

html[data-theme="dark"] body#page-top .mcx4-newsletter__input {
    color: var(--theme-text);
    background: transparent !important;
}

html[data-theme="dark"] body#page-top .mcx4-newsletter__input::placeholder { color: #b6a9ba; }
html[data-theme="dark"] body#page-top .mcx4-newsletter__note { color: var(--theme-muted); }

/* Brand strip and fixed navigation on the public site. */
html[data-theme="dark"] body#page-top .mcx3-header {
    --ink: var(--theme-text);
    --muted: var(--theme-muted);
    --bd: var(--theme-border);
}

html[data-theme="dark"] body#page-top .mcx3-header :is(.mcx3-brand, .mcx3-nav, .mcx3-offcanvas, .mcx3-dd) {
    color: var(--theme-text);
    border-color: var(--theme-border) !important;
    background-color: var(--theme-surface) !important;
}

html[data-theme="dark"] body#page-top .mcx3-header :is(.mcx3-title, .mcx3-mobile-name, .mcx3-link, .mcx3-chip) {
    color: var(--theme-text) !important;
}

html[data-theme="dark"] body#page-top .mcx3-header .mcx3-mobile-name small { color: var(--theme-muted) !important; }
html[data-theme="dark"] body#page-top .mcx3-header .mcx3-chip { border-color: var(--theme-border); background: var(--theme-surface-raised); }
html[data-theme="dark"] body#page-top .mcx3-header .mcx3-link:hover,
html[data-theme="dark"] body#page-top .mcx3-header .mcx3-link.active { color: #ffadd7 !important; background: #382a39 !important; }
html[data-theme="dark"] body#page-top .mcx3-header .mcx3-link-cta { color: #fff !important; background: #493347 !important; }
html[data-theme="dark"] body#page-top .mcx3-header :is(.mcx3-btn:not(.mcx3-btn-pink), .mcx3-offclose, .mcx3-toggler) {
    border-color: var(--theme-border);
    color: var(--theme-text) !important;
    background-color: var(--theme-surface-raised);
}
html[data-theme="dark"] body#page-top .mcx3-header .mcx3-burger,
html[data-theme="dark"] body#page-top .mcx3-header .mcx3-burger::before,
html[data-theme="dark"] body#page-top .mcx3-header .mcx3-burger::after { background-color: var(--theme-text); }
html[data-theme="dark"] body#page-top .mcx3-header .mcx3-dditem { color: var(--theme-text); }
html[data-theme="dark"] body#page-top .mcx3-header .mcx3-dditem:hover { color: #ffadd7; background: #382a39; }

body#page-top .mcx3-nav .platform-theme-toggle--nav {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    margin: 0;
    padding: 0;
    border-color: rgba(15, 23, 42, .14);
    color: #7b205b;
    background: #fff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .12);
}

body#page-top .mcx3-nav .platform-theme-toggle--nav svg { width: 21px; height: 21px; flex-basis: 21px; }
body#page-top .mcx3-nav .platform-theme-toggle--nav:focus-visible { outline: 3px solid #ec4899; outline-offset: 3px; }

html[data-theme="dark"] body#page-top .mcx3-nav .platform-theme-toggle--nav {
    border-color: #60485d;
    color: #ffe1f2;
    background: #382a39;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .28);
}

@media (max-width: 1199.98px) {
    body#page-top .mcx3-nav .platform-theme-toggle--nav { flex-basis: 40px; width: 40px; height: 40px; min-width: 40px; min-height: 40px; }
}

html[data-theme="dark"] body#page-top #main-content .policy-content table th,
html[data-theme="dark"] body#page-top #main-content .policy-content table td { border-color: var(--theme-border) !important; }
html[data-theme="dark"] body#page-top #main-content .policy-footer { border-color: var(--theme-border) !important; }

/* Admin partner catalogue: replace light inline tab/filter surfaces in dark mode. */
.admin-partners-page .partner-management-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: 1px solid var(--theme-border);
}
.admin-partners-page .partner-management-tabs .nav-link {
    padding: 10px 20px;
    border: 1px solid transparent;
    border-radius: 10px 10px 0 0;
    color: #666;
    background: #f5f5f5;
    font-weight: 500;
}
.admin-partners-page .partner-management-tabs .nav-link.active {
    border-color: #cdef84;
    color: #101010;
    background: #cdef84;
    font-weight: 650;
}
.admin-partners-page .admin-partner-logo { display: block; width: 40px; height: 40px; overflow: hidden; border-radius: 50%; }
.admin-partners-page .admin-partner-logo img { display: block; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.admin-partners-page .admin-partner-logo__placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    border: 1px solid var(--theme-border);
    border-radius: inherit;
    color: #79506f;
    background: #f2edf2;
    font-size: 16px;
}
.admin-partners-page .admin-partner-logo__placeholder[hidden] { display: none !important; }

html[data-theme="dark"] .admin-partners-page .partner-management-tabs { border-bottom-color: var(--theme-border); }
html[data-theme="dark"] .admin-partners-page .partner-management-tabs .nav-link {
    border-color: var(--theme-border) !important;
    color: var(--theme-muted) !important;
    background: var(--theme-surface-raised) !important;
}
html[data-theme="dark"] .admin-partners-page .partner-management-tabs .nav-link:hover {
    border-color: #76516d !important;
    color: #ffd1eb !important;
    background: #382a39 !important;
}
html[data-theme="dark"] .admin-partners-page .partner-management-tabs .nav-link.active {
    border-color: #8c4e76 !important;
    color: #fff !important;
    background: #57334d !important;
}
html[data-theme="dark"] .admin-partners-page .primary-form-group .primary-form-group-wrap > .form-label {
    color: var(--theme-muted) !important;
    background-color: var(--theme-surface) !important;
}
html[data-theme="dark"] .admin-partners-page .nice-select {
    border-color: var(--theme-border) !important;
    color: var(--theme-text) !important;
    background: var(--theme-control) !important;
}
html[data-theme="dark"] .admin-partners-page .nice-select .list {
    border: 1px solid var(--theme-border);
    color: var(--theme-text);
    background: var(--theme-surface-raised);
}
html[data-theme="dark"] .admin-partners-page .nice-select .option { color: var(--theme-text); }
html[data-theme="dark"] .admin-partners-page .nice-select .option:hover,
html[data-theme="dark"] .admin-partners-page .nice-select .option.focus,
html[data-theme="dark"] .admin-partners-page .nice-select .option.selected.focus { color: #ffd1eb; background: #493347; }
html[data-theme="dark"] .admin-partners-page .bg-cdef84 {
    border-color: #657d3c !important;
    color: #f2ffd6 !important;
    background-color: #52672d !important;
}
html[data-theme="dark"] .admin-partners-page .admin-partner-logo__placeholder {
    border-color: var(--theme-border);
    color: #f3a8d5;
    background: var(--theme-surface-raised);
}

/* Admin dashboard has its own light palette, so explicitly map every surface in dark mode. */
html[data-theme="dark"] .zMainContent .admin-dashboard {
    --dashboard-surface: var(--theme-surface);
    --dashboard-raised: var(--theme-surface-raised);
    --dashboard-text: var(--theme-text);
    --dashboard-muted: var(--theme-muted);
    --dashboard-border: var(--theme-border);
    color: var(--dashboard-text) !important;
    background: var(--theme-page) !important;
}
html[data-theme="dark"] .zMainContent .admin-dashboard :is(h1, h2, h3, .metric-value, td, strong) {
    color: var(--dashboard-text) !important;
}
html[data-theme="dark"] .zMainContent .admin-dashboard .muted,
html[data-theme="dark"] .zMainContent .admin-dashboard .metric-label,
html[data-theme="dark"] .zMainContent .admin-dashboard th {
    color: var(--dashboard-muted) !important;
}
html[data-theme="dark"] .zMainContent .admin-dashboard :is(.filter-bar, .card) {
    color: var(--dashboard-text) !important;
    border-color: var(--dashboard-border) !important;
    background: var(--dashboard-surface) !important;
    box-shadow: none;
}
html[data-theme="dark"] .zMainContent .admin-dashboard .filter-bar {
    box-shadow: 0 10px 28px rgba(0, 0, 0, .2) !important;
}
html[data-theme="dark"] .zMainContent .admin-dashboard :is(.period-btn, input[type="date"], input[type="month"], input[type="number"]) {
    color: var(--dashboard-text) !important;
    border-color: var(--dashboard-border) !important;
    background: var(--theme-control) !important;
    color-scheme: dark;
}
html[data-theme="dark"] .zMainContent .admin-dashboard .period-btn:hover {
    border-color: #8c4e76 !important;
    background: #382a39 !important;
}
html[data-theme="dark"] .zMainContent .admin-dashboard :is(.period-btn.active, .bg-gray-900) {
    border-color: #8c4e76 !important;
    color: #fff !important;
    background: #57334d !important;
}
html[data-theme="dark"] .zMainContent .admin-dashboard .apply-btn {
    border-color: #c13d91 !important;
    color: #fff !important;
    background: #a62a78 !important;
}
html[data-theme="dark"] .zMainContent .admin-dashboard .apply-btn:hover {
    background: #bd358c !important;
}
html[data-theme="dark"] .zMainContent .admin-dashboard .progress-track {
    background: #3a303e;
}
html[data-theme="dark"] .zMainContent .admin-dashboard .progress-fill {
    background: #34d399;
}
html[data-theme="dark"] .zMainContent .admin-dashboard :is(th, td) {
    border-color: var(--dashboard-border) !important;
    color: var(--dashboard-text) !important;
    background: transparent !important;
}
html[data-theme="dark"] .zMainContent .admin-dashboard th {
    background: var(--dashboard-raised) !important;
}
html[data-theme="dark"] .zMainContent .admin-dashboard .status-pill {
    color: #ded4e0 !important;
    background: #3a303e !important;
}
html[data-theme="dark"] .zMainContent .admin-dashboard .status-green {
    color: #a6edc5 !important;
    background: #1d3b30 !important;
}
html[data-theme="dark"] .zMainContent .admin-dashboard .status-red {
    color: #ffb5bc !important;
    background: #482a31 !important;
}
html[data-theme="dark"] .zMainContent .admin-dashboard .status-orange {
    color: #ffd68a !important;
    background: #483820 !important;
}
html[data-theme="dark"] .zMainContent .admin-dashboard .text-green-600 {
    color: #78dfad !important;
}
html[data-theme="dark"] .zMainContent .admin-dashboard .text-red-500 {
    color: #ff929d !important;
}
html[data-theme="dark"] .zMainContent .admin-dashboard .text-gray-400 {
    color: #b7aabb !important;
}
html[data-theme="dark"] .zMainContent .admin-dashboard .text-orange {
    color: #ffd078 !important;
}
html[data-theme="dark"] .zMainContent .admin-dashboard .mini-icon {
    color: #c9baff;
    background: #38324b;
}
html[data-theme="dark"] .zMainContent .admin-dashboard .link-action {
    color: #ff9bd2 !important;
}

@media (prefers-reduced-motion: reduce) {
    body#page-top .mcx3-nav .platform-theme-toggle { transition: none; }
}
