/* NewSoci light/dark theme patch. No database changes are required. */
html{
    color-scheme:light;
}
html[data-theme="dark"]{
    color-scheme:dark;
    --bg:#0b1120;
    --card:#111827;
    --text:#f3f6fb;
    --muted:#9aa8bb;
    --border:#263247;
    --shadow:0 12px 34px rgba(0,0,0,.28);

    --admin-bg:#0b1120;
    --admin-card:#111827;
    --admin-text:#f3f6fb;
    --admin-muted:#9aa8bb;
    --admin-border:#263247;
    --admin-dark:#080d18;
    --admin-shadow:0 12px 34px rgba(0,0,0,.28);
}

html.theme-ready body,
html.theme-ready .topbar,
html.theme-ready .card,
html.theme-ready .widget,
html.theme-ready .profile-card,
html.theme-ready .side-menu,
html.theme-ready .top-dropdown-panel,
html.theme-ready .admin-topbar,
html.theme-ready .admin-panel,
html.theme-ready .admin-stat-card,
html.theme-ready input,
html.theme-ready textarea,
html.theme-ready select{
    transition:background-color .18s ease,color .18s ease,border-color .18s ease,box-shadow .18s ease;
}

/* Theme toggle used beside the account/user bar. */
.theme-toggle{
    width:44px;
    height:44px;
    flex:0 0 44px;
    border:1px solid var(--border,#e5eaf2);
    border-radius:12px;
    background:#f5f7fb;
    color:#526079;
    display:grid;
    place-items:center;
    padding:0;
    box-shadow:none;
    -webkit-appearance:none;
    appearance:none;
}
.theme-toggle:hover,
.theme-toggle:focus-visible{
    border-color:#9fc2ff;
    background:#eaf2ff;
    color:#0f6fff;
    outline:none;
}
.theme-toggle-symbol{
    display:grid;
    place-items:center;
    width:24px;
    height:24px;
    font-size:25px;
    line-height:1;
    font-family:Arial,sans-serif;
}
.theme-toggle-symbol::before{
    content:"☾";
    transform:translateY(-1px);
}
html[data-theme="dark"] .theme-toggle-symbol::before{
    content:"☀";
    font-size:21px;
    transform:none;
}
.theme-toggle-admin{
    margin-left:auto;
}
.theme-toggle-admin + .admin-avatar{
    margin-left:0;
}

/* Main website dark mode. */
html[data-theme="dark"] body{
    background:#0b1120;
    color:var(--text);
}
html[data-theme="dark"] .topbar{
    background:#0f1726;
    border-color:var(--border);
}
html[data-theme="dark"] .brand,
html[data-theme="dark"] .post-author,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] strong{
    color:var(--text);
}
html[data-theme="dark"] .top-search,
html[data-theme="dark"] .people-search-form>label,
html[data-theme="dark"] .conversation-search,
html[data-theme="dark"] .gif-search-form,
html[data-theme="dark"] .youtube-link-form,
html[data-theme="dark"] .message-search-form{
    background:#151f30;
    border-color:var(--border);
}
html[data-theme="dark"] .top-search input,
html[data-theme="dark"] .gif-search-form input,
html[data-theme="dark"] .people-search-form input,
html[data-theme="dark"] .conversation-search input,
html[data-theme="dark"] .message-search-form input{
    color:var(--text);
    background:transparent;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder{
    color:#718096;
}
html[data-theme="dark"] .top-actions>a:not(.profile-link),
html[data-theme="dark"] .top-icon-button,
html[data-theme="dark"] .mobile-menu-btn,
html[data-theme="dark"] .userbar-button{
    color:#a8b3c5;
}
html[data-theme="dark"] .top-actions>a:hover,
html[data-theme="dark"] .top-actions>a.active,
html[data-theme="dark"] .top-icon-button:hover,
html[data-theme="dark"] .top-icon-button[aria-expanded="true"],
html[data-theme="dark"] .mobile-menu-btn:hover{
    background:#172a48;
    color:#78aaff;
}
html[data-theme="dark"] .theme-toggle{
    background:#151f30;
    border-color:#2a3850;
    color:#f6c453;
}
html[data-theme="dark"] .theme-toggle:hover,
html[data-theme="dark"] .theme-toggle:focus-visible{
    background:#1c2b42;
    border-color:#45658e;
    color:#ffd66b;
}
html[data-theme="dark"] .nav-badge{
    border-color:#0f1726;
}

html[data-theme="dark"] :is(
    .profile-card,
    .card,
    .widget,
    .side-menu,
    .auth-panel,
    .top-dropdown-panel,
    .profile-hero-body,
    .comments,
    .conversation-pane,
    .chat-pane,
    .chat-header,
    .message-composer,
    .emoji-picker,
    .friend-card,
    .action-menu-dropdown,
    .profile-dots-dropdown,
    .composer-picker,
    .settings-profile-preview,
    .settings-upload-field>strong,
    .leaderboard-your-rank,
    .webrtc-call-chat-panel,
    .webrtc-call-chat-header,
    .incoming-call-popup,
    .fake-likes-dialog,
    .birthday-countdown,
    .notification-footer,
    .report-card
){
    background:#111827;
    border-color:var(--border);
    color:var(--text);
    box-shadow:var(--shadow);
}
html[data-theme="dark"] .profile-hero-body{
    background:#111827!important;
}
html[data-theme="dark"] .profile-avatar,
html[data-theme="dark"] .profile-hero-body>img{
    border-color:#111827!important;
}
html[data-theme="dark"] .side-menu a,
html[data-theme="dark"] .userbar-menu a,
html[data-theme="dark"] .notification-item,
html[data-theme="dark"] .tag-list a,
html[data-theme="dark"] .post-actions button,
html[data-theme="dark"] .post-actions a,
html[data-theme="dark"] .composer-tool-button,
html[data-theme="dark"] .upload-option{
    color:#b4c0d1;
}
html[data-theme="dark"] .side-menu a:hover,
html[data-theme="dark"] .side-menu a.active,
html[data-theme="dark"] .userbar-menu a:hover,
html[data-theme="dark"] .notification-item:hover,
html[data-theme="dark"] .tag-list a:hover,
html[data-theme="dark"] .post-actions button:hover,
html[data-theme="dark"] .post-actions a:hover,
html[data-theme="dark"] .composer-tool-button:hover,
html[data-theme="dark"] .upload-option:hover,
html[data-theme="dark"] .profile-dots-dropdown a:hover{
    background:#18263a!important;
    color:#80adff!important;
}
html[data-theme="dark"] .post-actions .active{
    background:#172a48;
    color:#80adff;
}
html[data-theme="dark"] .secondary-button,
html[data-theme="dark"] .reply-cancel-button,
html[data-theme="dark"] .fake-likes-cancel,
html[data-theme="dark"] .show-more-posts-button,
html[data-theme="dark"] .site-pagination a,
html[data-theme="dark"] .chat-call-actions>button,
html[data-theme="dark"] .chat-profile-link{
    background:#1a2638;
    border-color:#2c3b51;
    color:#d4dbe6;
}
html[data-theme="dark"] .secondary-button:hover,
html[data-theme="dark"] .reply-cancel-button:hover,
html[data-theme="dark"] .site-pagination a:hover,
html[data-theme="dark"] .chat-call-actions>button:hover,
html[data-theme="dark"] .chat-profile-link:hover{
    background:#22344d;
    color:#fff;
}

html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
html[data-theme="dark"] textarea,
html[data-theme="dark"] select{
    background:#0f1726!important;
    border-color:#2b3950!important;
    color:#eef3fa!important;
}
html[data-theme="dark"] input:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] select:focus{
    border-color:#4f86d9!important;
    box-shadow:0 0 0 3px rgba(48,116,220,.22)!important;
    background:#111c2d!important;
}
html[data-theme="dark"] select option{
    background:#111827;
    color:#eef3fa;
}
html[data-theme="dark"] .privacy-switch,
html[data-theme="dark"] .toggle-switch{
    background:#3a4658;
}
html[data-theme="dark"] .privacy-switch::after,
html[data-theme="dark"] .toggle-switch::after{
    background:#e8edf5;
}

html[data-theme="dark"] .post-stats,
html[data-theme="dark"] .post-actions,
html[data-theme="dark"] .main-comment-form,
html[data-theme="dark"] .notification-footer,
html[data-theme="dark"] .dropdown-panel-heading,
html[data-theme="dark"] .chat-header,
html[data-theme="dark"] .message-composer,
html[data-theme="dark"] .conversation-heading,
html[data-theme="dark"] .settings-section,
html[data-theme="dark"] .profile-tabs{
    border-color:var(--border)!important;
}
html[data-theme="dark"] .comment>div,
html[data-theme="dark"] .comment-bubble,
html[data-theme="dark"] .comment-reply .comment-bubble{
    background:#182335;
    color:var(--text);
}
html[data-theme="dark"] .comment-replies{
    border-color:#334159;
}
html[data-theme="dark"] .message-bubble{
    background:#1a2638;
    color:#eef3fa;
}
html[data-theme="dark"] .message-row.mine .message-bubble,
html[data-theme="dark"] .message-bubble.mine{
    background:#145dcc;
    color:#fff;
}
html[data-theme="dark"] .conversation-item:hover,
html[data-theme="dark"] .conversation-item.active{
    background:#18263a;
}
html[data-theme="dark"] .conversation-item.unread{
    background:#172a48;
}
html[data-theme="dark"] .message-stream,
html[data-theme="dark"] .messages-layout{
    background:#0d1523;
    border-color:var(--border);
}
html[data-theme="dark"] .emoji-picker button:hover,
html[data-theme="dark"] .feeling-grid button:hover{
    background:#26344a;
}
html[data-theme="dark"] .feeling-grid button,
html[data-theme="dark"] .composer-selected-media,
html[data-theme="dark"] .selected-gif-preview,
html[data-theme="dark"] .report-reasons span,
html[data-theme="dark"] .registration-gender label>span,
html[data-theme="dark"] .settings-warning-box,
html[data-theme="dark"] .profile-blocked-status,
html[data-theme="dark"] .password-pin-required,
html[data-theme="dark"] .math-captcha-label strong{
    background:#182335;
    border-color:#2d3b52;
    color:#dce3ed;
}
html[data-theme="dark"] .composer-feeling-status{
    background:#322714;
    color:#f8cf79;
}
html[data-theme="dark"] .composer-feeling-status button,
html[data-theme="dark"] .composer-selected-media>button,
html[data-theme="dark"] .selected-gif-preview>button,
html[data-theme="dark"] .selected-message-image button{
    background:#263247;
}
html[data-theme="dark"] .youtube-link-status.error,
html[data-theme="dark"] .fake-likes-feedback.error{
    background:#3a1c23;
    color:#ffb4bd;
}
html[data-theme="dark"] .birthday-countdown.today{
    background:#173323;
    color:#9ce6b5;
}
html[data-theme="dark"] .notification-empty,
html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .comments-empty{
    color:var(--muted);
}
html[data-theme="dark"] .sidebar-close{
    background:#182335;
    color:#eef3fa;
}
html[data-theme="dark"] .left-sidebar{
    background:var(--bg);
}
html[data-theme="dark"] .webrtc-call-shell,
html[data-theme="dark"] .webrtc-call-stage,
html[data-theme="dark"] .incoming-call-overlay,
html[data-theme="dark"] .fake-likes-overlay{
    color:#fff;
}
html[data-theme="dark"] .webrtc-call-chat-content,
html[data-theme="dark"] .webrtc-call-chat-content>.message-composer{
    background:#0d1523;
    border-color:#263247;
}
html[data-theme="dark"] .action-menu-dropdown,
html[data-theme="dark"] .profile-dots-dropdown,
html[data-theme="dark"] .top-dropdown-panel{
    box-shadow:0 18px 48px rgba(0,0,0,.48);
}
html[data-theme="dark"] hr{
    border-color:var(--border);
}

/* Keep logo and photographs natural in dark mode. */
html[data-theme="dark"] img,
html[data-theme="dark"] video{
    color-scheme:normal;
}

/* Admin panel dark mode. */
html[data-theme="dark"] .admin-layout,
html[data-theme="dark"] .admin-main,
html[data-theme="dark"] .admin-content{
    background:var(--admin-bg);
    color:var(--admin-text);
}
html[data-theme="dark"] .admin-sidebar{
    background:#080d18;
    border-right:1px solid #1e293b;
}
html[data-theme="dark"] .admin-topbar{
    background:#0f1726;
    border-color:var(--admin-border);
}
html[data-theme="dark"] .admin-theme-toggle{
    border-color:#2a3850;
}
html[data-theme="dark"] :is(
    .admin-stat-card,
    .admin-panel,
    .feature-toggle-card,
    .report-information article,
    .report-details-box,
    .reported-content,
    .widget-order-row,
    .system-message-row,
    .bad-word-item
){
    background:var(--admin-card);
    border-color:var(--admin-border);
    color:var(--admin-text);
    box-shadow:var(--admin-shadow);
}
html[data-theme="dark"] .admin-table th,
html[data-theme="dark"] .admin-table td,
html[data-theme="dark"] .admin-list-row,
html[data-theme="dark"] .settings-section,
html[data-theme="dark"] .admin-sidebar-bottom{
    border-color:var(--admin-border);
}
html[data-theme="dark"] .admin-table tbody tr:hover,
html[data-theme="dark"] .admin-list-row:hover,
html[data-theme="dark"] .feature-toggle-card:hover{
    background:#162235;
}
html[data-theme="dark"] .admin-stat-card>span,
html[data-theme="dark"] .admin-list-icon{
    background:#172a48;
    color:#82afff;
}
html[data-theme="dark"] .admin-menu-button,
html[data-theme="dark"] .admin-button,
html[data-theme="dark"] .admin-pagination a,
html[data-theme="dark"] .report-tabs a,
html[data-theme="dark"] .api-key-field button{
    background:#182335;
    border-color:#2d3b52;
    color:#dce3ed;
}
html[data-theme="dark"] .admin-button:hover,
html[data-theme="dark"] .admin-pagination a:hover,
html[data-theme="dark"] .report-tabs a:hover{
    background:#22344d;
    color:#fff;
}
html[data-theme="dark"] .admin-button.danger{
    background:#3a1c23;
    border-color:#61303a;
    color:#ffb4bd;
}
html[data-theme="dark"] .admin-button.success{
    background:#173323;
    border-color:#2d5b3c;
    color:#9ce6b5;
}
html[data-theme="dark"] .admin-filter-form label,
html[data-theme="dark"] .admin-filter-form select,
html[data-theme="dark"] .admin-filter-form>button,
html[data-theme="dark"] .api-key-field>div{
    background:#0f1726;
    border-color:#2b3950;
}
html[data-theme="dark"] .admin-filter-form input,
html[data-theme="dark"] .api-key-field input{
    background:transparent!important;
}
html[data-theme="dark"] .status-badge.dismissed,
html[data-theme="dark"] .admin-button.muted-button{
    background:#242d3b;
    color:#bcc5d2;
}
html[data-theme="dark"] .admin-pagination .pagination-ellipsis{
    background:transparent;
}

@media(max-width:900px){
    .theme-toggle-front{
        width:40px;
        height:40px;
        flex-basis:40px;
        border-radius:11px;
    }
}
@media(max-width:600px){
    .theme-toggle-front{
        width:38px;
        height:38px;
        flex-basis:38px;
    }
    .theme-toggle-symbol{
        font-size:22px;
    }
    html[data-theme="dark"] .card,
    html[data-theme="dark"] .page-heading,
    html[data-theme="dark"] .profile-hero-body,
    html[data-theme="dark"] .comments{
        border-color:#202c3e;
    }
}


/* Newer Pages, Groups, Events, and popup chat compatibility */
html[data-theme="dark"] :is(
    .pages-heading,
    .page-profile-card,
    .page-tab-panel,
    .page-dashboard-card,
    .groups-heading,
    .group-profile-card,
    .group-tab-panel,
    .group-dashboard-card,
    .events-heading,
    .events-filter-card,
    .event-card,
    .event-profile-card,
    .event-tab-panel,
    .event-side-card,
    .event-dashboard-card,
    .event-dashboard-stat,
    .event-form-card,
    .desktop-chat-window,
    .desktop-chat-list-panel,
    .event-more-menu
){
    background:var(--card,#111827);
    border-color:var(--border,#263247);
    color:var(--text,#f3f6fb);
}

html[data-theme="dark"] :is(
    .events-tabs a,
    .event-tabs a,
    .event-dashboard-tabs a,
    .page-tabs a,
    .group-tabs a,
    .event-icon-button,
    .event-secondary-button,
    .event-rsvp-menu button
){
    color:#c2cddd;
    border-color:var(--border,#263247);
    background:#151f30;
}

html[data-theme="dark"] :is(
    .events-tabs a.active,
    .event-tabs a.active,
    .event-dashboard-tabs a.active,
    .page-tabs a.active,
    .group-tabs a.active
){
    color:#fff;
    border-color:#176bff;
    background:#176bff;
}

html[data-theme="dark"] .event-more-menu{
    box-shadow:0 18px 48px rgba(0,0,0,.5);
}

html[data-theme="dark"] .desktop-chat-window{
    box-shadow:0 18px 48px rgba(0,0,0,.48);
}

/* Keep the injected toggle aligned with the newest top bar. */
.top-actions .theme-toggle-front{
    position:relative;
    margin:0;
}

.admin-topbar .theme-toggle-admin{
    position:relative;
}

/* 2026 full dark-mode hardening: notifications, site pages, and admin panel. */
html[data-theme="dark"]{
    --bg:#080f1d;
    --card:#111827;
    --text:#f3f6fb;
    --muted:#9aa8bb;
    --border:#2a3850;
    --admin-bg:#080f1d;
    --admin-card:#111827;
    --admin-text:#f3f6fb;
    --admin-muted:#9aa8bb;
    --admin-border:#2a3850;
}

/* Notification dropdown and full notifications page. */
html[data-theme="dark"] :is(
    .top-dropdown-panel,
    .notification-panel,
    .notification-heading,
    .notification-list,
    .notification-footer,
    .notification-empty,
    .notifications-page-card,
    .notifications-page-list
){
    background:#111827!important;
    border-color:#2a3850!important;
    color:#eef3fa!important;
}
html[data-theme="dark"] .notification-panel{
    box-shadow:0 22px 62px rgba(0,0,0,.58)!important;
}
html[data-theme="dark"] :is(
    .notification-heading h3,
    .notification-empty strong,
    .notification-copy strong,
    .notifications-page-heading h1
){
    color:#f6f8fc!important;
}
html[data-theme="dark"] :is(
    .notification-heading p,
    .notification-empty p,
    .notification-preview
){
    color:#9aa8bb!important;
}
html[data-theme="dark"] .notification-item{
    background:transparent!important;
    color:#e8eef7!important;
    border-color:#2a3850!important;
}
html[data-theme="dark"] .notification-item:hover{
    background:#1a2940!important;
}
html[data-theme="dark"] .notification-item.unread{
    background:#162b4b!important;
    box-shadow:inset 3px 0 0 #4f8cff!important;
}
html[data-theme="dark"] .notification-item.unread:hover{
    background:#1a355b!important;
}
html[data-theme="dark"] .notification-empty>span{
    background:#172a48!important;
    color:#78aaff!important;
}
html[data-theme="dark"] .notification-avatar-wrap>small{
    border-color:#111827!important;
}
html[data-theme="dark"] .notification-clear-button{
    color:#ff9ca6!important;
}
html[data-theme="dark"] .notification-clear-button:hover{
    background:#3a1c23!important;
    color:#ffc1c7!important;
}
html[data-theme="dark"] .notification-footer button{
    background:#1a2638!important;
    color:#dce5f2!important;
}
html[data-theme="dark"] .notification-footer button:hover,
html[data-theme="dark"] .notification-footer a:hover{
    background:#203552!important;
    color:#8ab4ff!important;
}
html[data-theme="dark"] .notification-list{
    scrollbar-color:#46566d #111827;
}

/* Public-site surfaces that previously remained white. */
html[data-theme="dark"] :is(
    .composer textarea,
    .comment-form input,
    .people-grid a,
    .profile-about-item,
    .registration-avatar-uploader,
    .registration-gender label>span,
    .settings-profile-preview,
    .settings-upload-field,
    .privacy-select-row,
    .privacy-toggle-card,
    .message-privacy-notice,
    .youtube-link-form,
    .youtube-link-form input,
    .profile-media-more-button,
    .show-more-posts-button,
    .readonly-setting,
    .settings-panel input[readonly],
    .settings-panel .readonly-setting,
    .registration-progress li>span,
    .registration-avatar-button>span,
    .settings-upload-field>strong,
    .webrtc-call-chat-header,
    .webrtc-call-chat-content,
    .webrtc-call-chat-content>.message-stream,
    .webrtc-call-chat-content>.message-composer,
    .incoming-call-popup,
    .chat-call-actions>button,
    .chat-profile-link,
    .profile-media-item,
    .notifications-page-card
){
    background:#111827!important;
    border-color:#2a3850!important;
    color:#e8eef7!important;
}
html[data-theme="dark"] :is(
    .profile-about-item,
    .registration-avatar-uploader,
    .settings-upload-field,
    .privacy-select-row,
    .privacy-toggle-card,
    .message-privacy-notice
){
    background:#151f30!important;
}
html[data-theme="dark"] .settings-avatar-row>img{
    border-color:#111827!important;
    background:#111827!important;
}
html[data-theme="dark"] :is(
    .profile-tabs a:hover,
    .settings-tabs a:hover,
    .registration-password-field button:hover,
    .point-earned-popup>button:hover
){
    background:#1a2940!important;
    color:#80adff!important;
}
html[data-theme="dark"] .people-search-form>label:focus-within{
    background:#151f30!important;
}
html[data-theme="dark"] .profile-blocked-status,
html[data-theme="dark"] .point-limit-reached{
    background:#3a1c23!important;
    border-color:#61303a!important;
    color:#ffb4bd!important;
}
html[data-theme="dark"] :is(
    .security-pin-status.missing,
    .password-pin-required,
    .settings-warning-box
){
    background:#352817!important;
    border-color:#6b4e22!important;
    color:#f6c982!important;
}
html[data-theme="dark"] .message-privacy-notice{
    border-top-color:#2a3850!important;
}
html[data-theme="dark"] .youtube-link-form>span{
    background:#3a1c23!important;
    color:#ff9ca6!important;
}
html[data-theme="dark"] :is(
    .show-more-posts-button:hover,
    .profile-media-more-button:hover,
    .settings-upload-field>strong:hover,
    .registration-avatar-button>span:hover
){
    background:#1c3150!important;
    border-color:#4c75ad!important;
    color:#8ab4ff!important;
}

/* Newer Pages, Groups, Events, Stories, Live and chat surfaces. */
html[data-theme="dark"] :is(
    .pages-heading,
    .page-profile-card,
    .page-tab-panel,
    .page-dashboard-card,
    .groups-heading,
    .group-profile-card,
    .group-tab-panel,
    .group-dashboard-card,
    .events-heading,
    .events-filter-card,
    .event-card,
    .event-profile-card,
    .event-tab-panel,
    .event-side-card,
    .event-dashboard-card,
    .event-dashboard-stat,
    .event-form-card,
    .stories-shell,
    .stories-card,
    .story-card,
    .live-card,
    .live-dashboard-card,
    .desktop-chat-window,
    .desktop-chat-list-panel,
    .event-more-menu
){
    background:#111827!important;
    border-color:#2a3850!important;
    color:#eef3fa!important;
}

/* Admin layout, panels, tables and every settings surface. */
html[data-theme="dark"] body:has(.admin-layout){
    background:#080f1d!important;
}
html[data-theme="dark"] :is(
    .admin-layout,
    .admin-main,
    .admin-content
){
    background:#080f1d!important;
    color:#eef3fa!important;
}
html[data-theme="dark"] .admin-topbar{
    background:#0f1726!important;
    border-color:#2a3850!important;
}
html[data-theme="dark"] :is(
    .admin-panel,
    .settings-section,
    .admin-stat-card,
    .feature-toggle-card,
    .report-information article,
    .report-details-box,
    .reported-content,
    .report-actions-panel,
    .leaderboard-point-card,
    .widget-admin-directory-card,
    .widget-order-row,
    .bad-words-context-card,
    .bad-words-info-card,
    .system-message-composer,
    .system-message-history-panel,
    .system-message-history-item,
    .system-message-row,
    .vip-setting-card
){
    background:#111827!important;
    border-color:#2a3850!important;
    color:#eef3fa!important;
    box-shadow:0 12px 34px rgba(0,0,0,.28)!important;
}
html[data-theme="dark"] :is(
    .admin-panel-heading h2,
    .admin-topbar h1,
    .admin-stat-card strong,
    .feature-toggle-copy strong,
    .admin-list-copy strong,
    .table-user strong,
    .vip-setting-card strong
){
    color:#f6f8fc!important;
}
html[data-theme="dark"] :is(
    .admin-panel-heading p,
    .admin-topbar p,
    .admin-stat-card small,
    .feature-toggle-copy small,
    .admin-list-copy small,
    .table-user small,
    .table-subtext,
    .vip-setting-card small,
    .admin-empty
){
    color:#9aa8bb!important;
}
html[data-theme="dark"] .admin-table-wrap{
    background:#111827!important;
    border-radius:12px;
}
html[data-theme="dark"] .admin-table{
    background:#111827!important;
    color:#e8eef7!important;
}
html[data-theme="dark"] .admin-table th{
    background:#151f30!important;
    border-color:#2a3850!important;
    color:#9fb0c6!important;
}
html[data-theme="dark"] .admin-table td{
    background:#111827!important;
    border-color:#2a3850!important;
    color:#e8eef7!important;
}
html[data-theme="dark"] .admin-table tbody tr:hover td{
    background:#162235!important;
}
html[data-theme="dark"] :is(
    .admin-filter-form label,
    .admin-filter-form select,
    .suspend-form input,
    .admin-text-field input,
    .admin-textarea-field textarea,
    .admin-settings-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
    .admin-settings-form textarea,
    .admin-settings-form select,
    .leaderboard-point-card input,
    .video-source-card>select,
    .widget-position-control select,
    .widget-number-field input,
    .system-message-field input,
    .system-message-field textarea,
    .bad-words-field textarea,
    .vip-setting-card select,
    .vip-setting-card input[type="number"]
){
    background:#0f1726!important;
    border-color:#2b3950!important;
    color:#eef3fa!important;
}
html[data-theme="dark"] :is(
    .admin-filter-form input,
    .api-key-field input
){
    background:transparent!important;
    color:#eef3fa!important;
}
html[data-theme="dark"] :is(
    .admin-filter-form input,
    .admin-text-field input,
    .admin-textarea-field textarea,
    .admin-settings-form input,
    .admin-settings-form textarea,
    .admin-settings-form select
)::placeholder{
    color:#718096!important;
}
html[data-theme="dark"] :is(
    .admin-button,
    .admin-menu-button,
    .admin-pagination a,
    .report-tabs a,
    .api-key-field button,
    .admin-file-field>strong,
    .widget-order-button,
    .vip-users-summary a
){
    background:#182335!important;
    border-color:#2d3b52!important;
    color:#dce3ed!important;
}
html[data-theme="dark"] :is(
    .admin-button:hover,
    .admin-pagination a:hover,
    .report-tabs a:hover,
    .admin-file-field>strong:hover,
    .widget-order-button:hover:not(:disabled),
    .vip-users-summary a:hover
){
    background:#22344d!important;
    border-color:#45658e!important;
    color:#fff!important;
}
html[data-theme="dark"] :is(
    .admin-button.primary-setting-button,
    .admin-filter-form>button,
    .admin-button.verify-user-button,
    .vip-grant,
    .report-tabs a.active,
    .admin-pagination a.active,
    .vip-users-summary a.active
){
    background:#176bff!important;
    border-color:#176bff!important;
    color:#fff!important;
}
html[data-theme="dark"] :is(
    .admin-button.danger,
    .admin-button.delete-user-button,
    .vip-remove
){
    background:#3a1c23!important;
    border-color:#61303a!important;
    color:#ffb4bd!important;
}
html[data-theme="dark"] .admin-button.success{
    background:#173323!important;
    border-color:#2d5b3c!important;
    color:#9ce6b5!important;
}
html[data-theme="dark"] :is(
    .leaderboard-admin-note,
    .right-widget-admin-note,
    .left-menu-admin-note,
    .captcha-admin-preview,
    .system-message-note,
    .vip-help
){
    background:#151f30!important;
    border-color:#2b3950!important;
    color:#b9c5d6!important;
}
html[data-theme="dark"] :is(
    .site-logo-preview,
    .widget-sponsored-preview,
    .system-icon-option>span,
    .widget-order-icon,
    .bad-words-context-icon,
    .captcha-admin-preview>span,
    .system-message-note>span
){
    background:#172033!important;
    border-color:#2b3950!important;
    color:#82afff!important;
}
html[data-theme="dark"] :is(
    .vip-admin-badge,
    .leaderboard-formula-badge,
    .vip-source
){
    background:#352817!important;
    border-color:#6b4e22!important;
    color:#f6c982!important;
}
html[data-theme="dark"] .vip-admin-badge strong{
    color:#ffd66b!important;
}
html[data-theme="dark"] .vip-setting-card>span:first-child{
    background:#172a48!important;
    color:#82afff!important;
}
html[data-theme="dark"] .vip-access-summary span{
    background:#182335!important;
    color:#c4cede!important;
}
html[data-theme="dark"] :is(
    .status-badge.dismissed,
    .status-badge.unverified-status,
    .widget-admin-state.disabled,
    .widget-directory-position,
    .admin-button.muted-button,
    .admin-button.neutral
){
    background:#242d3b!important;
    color:#c1cad6!important;
    border-color:#394659!important;
}
html[data-theme="dark"] :is(.status-badge.open,.api-status.missing){
    background:#3b2919!important;
    color:#ffc47a!important;
}
html[data-theme="dark"] :is(.status-badge.reviewed,.api-status.configured){
    background:#173323!important;
    color:#9ce6b5!important;
}
html[data-theme="dark"] .status-badge.verified-status{
    background:#172a48!important;
    color:#82afff!important;
}
html[data-theme="dark"] .feature-toggle-card:hover,
html[data-theme="dark"] .widget-admin-directory-card:hover,
html[data-theme="dark"] .bad-words-context-card:hover{
    background:#162235!important;
    border-color:#45658e!important;
}
html[data-theme="dark"] .feature-toggle-card.video-source-card:hover{
    background:#111827!important;
    border-color:#2a3850!important;
}
html[data-theme="dark"] .admin-brand-logo{
    background:#111827!important;
    border-color:#334159!important;
}
html[data-theme="dark"] .admin-sidebar-bottom{
    border-color:#263247!important;
}
html[data-theme="dark"] .admin-overlay{
    background:rgba(0,0,0,.66)!important;
}

/* Native controls and scrollbars. */
html[data-theme="dark"] select option{
    background:#111827!important;
    color:#eef3fa!important;
}
html[data-theme="dark"] :is(body,.notification-list,.admin-table-wrap){
    scrollbar-color:#46566d #0f1726;
}


/* 2026 dark-mode hardening v2: remove remaining white surfaces site-wide and in admin. */
html[data-theme="dark"]{
    --bg:#080f1d;
    --card:#111827;
    --text:#f3f6fb;
    --muted:#9aa8bb;
    --border:#2a3850;
    --surface-2:#151f30;
    --surface-3:#17243a;
    --surface-hover:#1a2940;
    --surface-accent:#162b4b;
}

/* Shared text colors */
html[data-theme="dark"] :is(
    body,
    .card,
    .widget,
    .side-menu,
    .top-dropdown-panel,
    .dropdown-panel-heading,
    .notification-item,
    .notification-item *,
    .userbar-panel,
    .userbar-menu,
    .userbar-profile-summary,
    .composer-picker,
    .auth-panel,
    .admin-panel,
    .admin-topbar,
    .admin-table,
    .admin-table *,
    .admin-settings-form,
    .admin-list,
    .admin-list-row,
    .admin-nav-accordion-button,
    .admin-nav-accordion-panel,
    .admin-nav-accordion-panel a,
    .admin-filter-form,
    .admin-filter-form *,
    .admin-stat-card,
    .report-detail-layout,
    .report-information article,
    .report-details-box,
    .reported-content,
    .report-actions-panel
){
    color:#eef3fa;
}
html[data-theme="dark"] :is(
    p,
    small,
    .muted,
    .table-subtext,
    .dropdown-panel-heading p,
    .userbar-profile-summary small,
    .picker-heading p,
    .admin-empty,
    .admin-topbar p,
    .admin-panel-heading p,
    .admin-list-copy small,
    .notification-preview,
    .notification-time,
    .auth-panel p,
    .report-information span,
    .report-information small,
    .report-actions-panel>p
){
    color:#9aa8bb!important;
}

/* Front-end white surface cleanup */
html[data-theme="dark"] :is(
    .top-dropdown-panel,
    .notification-panel,
    .userbar-panel,
    .userbar-profile-summary,
    .composer-picker,
    .gif-search-form,
    .youtube-link-form,
    .feeling-grid button,
    .gif-result,
    .picker-heading>button,
    .dropdown-panel-heading,
    .notification-footer,
    .stories-strip,
    .story-item,
    .story-create-card,
    .story-viewer-sheet,
    .story-viewer-panel,
    .profile-about-item,
    .profile-media-more-button,
    .people-card,
    .friend-card,
    .page-card,
    .group-card,
    .event-card,
    .leaderboard-card,
    .leaderboard-row,
    .search-result-card,
    .saved-posts-empty,
    .comments-empty,
    .empty-state,
    .message-search-form,
    .conversation-search,
    .message-composer,
    .chat-header,
    .chat-pane,
    .conversation-pane,
    .message-stream,
    .desktop-chat-window,
    .desktop-chat-header,
    .desktop-chat-body,
    .desktop-chat-composer,
    .desktop-chat-user,
    .desktop-chat-empty,
    .privacy-select-row,
    .privacy-toggle-card,
    .settings-profile-preview,
    .settings-upload-field,
    .readonly-setting,
    .settings-panel .readonly-setting,
    .registration-avatar-uploader,
    .registration-gender label>span,
    .registration-progress li>span,
    .math-captcha-label strong,
    .fake-likes-dialog,
    .fake-likes-overlay,
    .incoming-call-popup,
    .webrtc-call-shell,
    .webrtc-call-stage,
    .webrtc-call-chat-header,
    .webrtc-call-chat-content,
    .webrtc-call-chat-content>.message-stream,
    .webrtc-call-chat-content>.message-composer,
    .action-menu-dropdown,
    .profile-dots-dropdown,
    .report-card,
    .notifications-page-card,
    .notifications-page-list
){
    background:#111827!important;
    border-color:#2a3850!important;
    color:#eef3fa!important;
}
html[data-theme="dark"] :is(
    .userbar-profile-summary,
    .picker-heading>button,
    .gif-search-form,
    .youtube-link-form,
    .top-search,
    .message-search-form,
    .conversation-search,
    .privacy-select-row,
    .privacy-toggle-card,
    .settings-upload-field,
    .registration-avatar-uploader,
    .registration-gender label>span,
    .settings-profile-preview,
    .desktop-chat-user,
    .empty-state,
    .comments-empty,
    .saved-posts-empty,
    .notifications-page-card
){
    background:#151f30!important;
}
html[data-theme="dark"] .userbar-profile-summary:hover,
html[data-theme="dark"] .picker-heading>button:hover,
html[data-theme="dark"] .gif-result:hover,
html[data-theme="dark"] .story-item:hover,
html[data-theme="dark"] .people-card:hover,
html[data-theme="dark"] .friend-card:hover,
html[data-theme="dark"] .page-card:hover,
html[data-theme="dark"] .group-card:hover,
html[data-theme="dark"] .event-card:hover,
html[data-theme="dark"] .desktop-chat-user:hover{
    background:#1a2940!important;
    border-color:#45658e!important;
}
html[data-theme="dark"] .userbar-menu a,
html[data-theme="dark"] .userbar-menu .logout-item,
html[data-theme="dark"] .notification-footer a,
html[data-theme="dark"] .notification-footer button{
    color:#dce3ed!important;
}
html[data-theme="dark"] .userbar-menu .logout-item{
    border-top-color:#2a3850!important;
}
html[data-theme="dark"] .picker-heading>button,
html[data-theme="dark"] .notification-clear-button,
html[data-theme="dark"] .desktop-chat-minimize,
html[data-theme="dark"] .desktop-chat-close{
    background:#182335!important;
    border:1px solid #2d3b52!important;
    color:#dce3ed!important;
}
html[data-theme="dark"] .picker-heading>button svg,
html[data-theme="dark"] .notification-clear-button svg{
    color:inherit!important;
}
html[data-theme="dark"] .youtube-link-form>span,
html[data-theme="dark"] .gif-search-form>button,
html[data-theme="dark"] .top-search>i,
html[data-theme="dark"] .message-search-form>i,
html[data-theme="dark"] .conversation-search>i{
    background:#17243a!important;
    color:#82afff!important;
}
html[data-theme="dark"] .top-dropdown .userbar-button{
    background:#151f30!important;
    border-color:#2a3850!important;
    color:#eef3fa!important;
}
html[data-theme="dark"] .top-dropdown .userbar-button:hover,
html[data-theme="dark"] .top-dropdown .userbar-button[aria-expanded="true"]{
    background:#1a2940!important;
    border-color:#45658e!important;
}
html[data-theme="dark"] .dropdown-panel-heading,
html[data-theme="dark"] .notification-heading{
    background:#111827!important;
    border-color:#2a3850!important;
}
html[data-theme="dark"] .notification-footer{
    border-top-color:#2a3850!important;
}

/* Generic form controls */
html[data-theme="dark"] :is(
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
    textarea,
    select,
    .admin-filter-form label,
    .api-key-field>div,
    .admin-file-field,
    .admin-file-field>strong,
    .admin-text-field input,
    .admin-textarea-field textarea,
    .system-message-field input,
    .system-message-field textarea,
    .widget-number-field input
){
    background:#0f1726!important;
    border-color:#2b3950!important;
    color:#eef3fa!important;
}
html[data-theme="dark"] :is(input,textarea,select)::placeholder{
    color:#718096!important;
}

/* Admin white surface cleanup */
html[data-theme="dark"] :is(
    .admin-layout,
    .admin-main,
    .admin-content,
    .admin-topbar,
    .admin-menu-button,
    .admin-stat-card,
    .admin-panel,
    .admin-table-wrap,
    .admin-table,
    .admin-list-row,
    .feature-toggle-card,
    .widget-admin-directory-card,
    .vip-setting-card,
    .vip-users-summary a,
    .vip-source,
    .vip-help,
    .vip-access-summary span,
    .leaderboard-point-card,
    .api-key-field>div,
    .admin-file-field,
    .admin-file-field>span,
    .system-message-composer,
    .system-message-history-panel,
    .system-message-history-item,
    .system-message-row,
    .bad-words-context-card,
    .bad-words-info-card,
    .widget-order-row,
    .captcha-admin-preview,
    .left-menu-admin-note,
    .leaderboard-admin-note,
    .right-widget-admin-note,
    .system-message-note,
    .report-information article,
    .report-details-box,
    .reported-content,
    .report-actions-panel,
    .widget-sponsored-preview,
    .site-logo-preview,
    .video-source-card,
    .admin-textarea-field textarea,
    .admin-filter-form select,
    .admin-filter-form>button,
    .admin-pagination a,
    .report-tabs a,
    .admin-button,
    .admin-menu-button,
    .admin-nav-accordion-button,
    .admin-nav-accordion-panel a,
    .admin-brand-logo
){
    background:#111827!important;
    border-color:#2a3850!important;
    color:#eef3fa!important;
}
html[data-theme="dark"] .admin-topbar,
html[data-theme="dark"] .admin-content,
html[data-theme="dark"] .admin-layout,
html[data-theme="dark"] body{
    background:#080f1d!important;
}
html[data-theme="dark"] .admin-menu-button,
html[data-theme="dark"] .admin-button,
html[data-theme="dark"] .admin-pagination a,
html[data-theme="dark"] .report-tabs a,
html[data-theme="dark"] .api-key-field button,
html[data-theme="dark"] .admin-file-field>strong,
html[data-theme="dark"] .widget-order-button,
html[data-theme="dark"] .vip-users-summary a{
    background:#182335!important;
    border-color:#2d3b52!important;
    color:#dce3ed!important;
}
html[data-theme="dark"] .admin-button:hover,
html[data-theme="dark"] .admin-pagination a:hover,
html[data-theme="dark"] .report-tabs a:hover,
html[data-theme="dark"] .api-key-field button:hover,
html[data-theme="dark"] .admin-file-field>strong:hover,
html[data-theme="dark"] .widget-order-button:hover:not(:disabled),
html[data-theme="dark"] .vip-users-summary a:hover,
html[data-theme="dark"] .admin-nav-accordion-button:hover,
html[data-theme="dark"] .admin-nav-accordion-panel a:hover{
    background:#22344d!important;
    border-color:#45658e!important;
    color:#fff!important;
}
html[data-theme="dark"] .admin-nav-accordion-button.active,
html[data-theme="dark"] .admin-nav-accordion-panel a.active,
html[data-theme="dark"] .admin-pagination a.active,
html[data-theme="dark"] .report-tabs a.active,
html[data-theme="dark"] .vip-users-summary a.active,
html[data-theme="dark"] .admin-button.primary-setting-button,
html[data-theme="dark"] .admin-filter-form>button{
    background:#176bff!important;
    border-color:#176bff!important;
    color:#fff!important;
}
html[data-theme="dark"] .admin-nav-accordion-panel{
    background:transparent!important;
    border-left-color:#334159!important;
}
html[data-theme="dark"] .admin-nav-label{
    color:#8da0ba!important;
}
html[data-theme="dark"] .admin-topbar{
    border-bottom-color:#263247!important;
}
html[data-theme="dark"] .admin-sidebar-bottom,
html[data-theme="dark"] .admin-nav-label.settings-label{
    border-top-color:#293448!important;
}
html[data-theme="dark"] .admin-table th{
    background:#151f30!important;
    border-color:#2a3850!important;
    color:#9fb0c6!important;
}
html[data-theme="dark"] .admin-table td{
    background:#111827!important;
    border-color:#2a3850!important;
    color:#e8eef7!important;
}
html[data-theme="dark"] .admin-table tbody tr:hover td,
html[data-theme="dark"] .admin-list-row:hover,
html[data-theme="dark"] .feature-toggle-card:hover,
html[data-theme="dark"] .widget-admin-directory-card:hover,
html[data-theme="dark"] .bad-words-context-card:hover,
html[data-theme="dark"] .widget-order-row:hover{
    background:#162235!important;
    border-color:#45658e!important;
}
html[data-theme="dark"] .admin-brand strong,
html[data-theme="dark"] .admin-topbar h1,
html[data-theme="dark"] .admin-panel-heading h2,
html[data-theme="dark"] .admin-stat-card strong{
    color:#f6f8fc!important;
}
html[data-theme="dark"] .admin-brand small,
html[data-theme="dark"] .admin-panel-heading p,
html[data-theme="dark"] .admin-stat-card small,
html[data-theme="dark"] .table-user small,
html[data-theme="dark"] .table-subtext,
html[data-theme="dark"] .vip-setting-card small,
html[data-theme="dark"] .widget-admin-directory-copy small{
    color:#9aa8bb!important;
}

/* Useful accent states remain readable. */
html[data-theme="dark"] .admin-button.danger,
html[data-theme="dark"] .vip-remove,
html[data-theme="dark"] .status-badge.dismissed,
html[data-theme="dark"] .widget-admin-state.disabled{
    background:#3a1c23!important;
    border-color:#61303a!important;
    color:#ffb4bd!important;
}
html[data-theme="dark"] .admin-button.success,
html[data-theme="dark"] .status-badge.reviewed,
html[data-theme="dark"] .widget-admin-state.enabled{
    background:#173323!important;
    border-color:#2d5b3c!important;
    color:#9ce6b5!important;
}
html[data-theme="dark"] .status-badge.open,
html[data-theme="dark"] .vip-source,
html[data-theme="dark"] .vip-admin-badge{
    background:#352817!important;
    border-color:#6b4e22!important;
    color:#f6c982!important;
}
html[data-theme="dark"] .status-badge.verified-status,
html[data-theme="dark"] .admin-list-icon,
html[data-theme="dark"] .widget-admin-directory-icon,
html[data-theme="dark"] .vip-setting-card>span:first-child,
html[data-theme="dark"] .captcha-admin-preview>span,
html[data-theme="dark"] .widget-order-icon,
html[data-theme="dark"] .site-logo-preview,
html[data-theme="dark"] .system-icon-option>span{
    background:#172a48!important;
    border-color:#2b3950!important;
    color:#82afff!important;
}

/* Left Menu admin page: page-specific stylesheet dark-mode protection. */
html[data-theme="dark"] .left-menu-order-status{
    background:#172a48!important;border-color:#31527e!important;color:#82afff!important;
}
html[data-theme="dark"] .left-menu-order-item{
    background:#111827!important;border-color:#2a3850!important;color:#eef3fa!important;
}
html[data-theme="dark"] .left-menu-order-item:hover{
    background:#162235!important;border-color:#45658e!important;
}
html[data-theme="dark"] :is(.left-menu-drag-handle,.left-menu-order-arrows button){
    background:#182335!important;border-color:#2d3b52!important;color:#b9c5d6!important;
}
html[data-theme="dark"] :is(.left-menu-drag-handle:hover,.left-menu-order-arrows button:hover:not(:disabled)){
    background:#22344d!important;border-color:#45658e!important;color:#82afff!important;
}
html[data-theme="dark"] .left-menu-order-number{
    background:#172a48!important;color:#82afff!important;
}
html[data-theme="dark"] .left-menu-order-item .feature-toggle-icon{
    background:#17243a!important;border:1px solid #2b3950!important;color:#82afff!important;
}
html[data-theme="dark"] .left-menu-order-copy strong{color:#f6f8fc!important}
html[data-theme="dark"] :is(.left-menu-order-copy small,.left-menu-order-toggle small){color:#9aa8bb!important}
html[data-theme="dark"] .left-menu-order-help{
    background:#151f30!important;border-color:#2b3950!important;color:#b9c5d6!important;
}
html[data-theme="dark"] .pages-admin-inline-nav a{
    background:#182335!important;border-color:#2d3b52!important;color:#dce3ed!important;
}
html[data-theme="dark"] .pages-admin-inline-nav a:hover{
    background:#22344d!important;border-color:#45658e!important;color:#fff!important;
}


/* COMPLETE ADMIN DARK MODE V3 */
html[data-theme="dark"]{
    --admin-bg:#080f1d;
    --admin-card:#111827;
    --admin-text:#f3f6fb;
    --admin-muted:#9aa8bb;
    --admin-border:#2a3850;
    --admin-dark:#070d18;
    --admin-shadow:0 12px 34px rgba(0,0,0,.30);
}

/* Every shared admin layout surface. */
html[data-theme="dark"] body:has(.admin-layout),
html[data-theme="dark"] .admin-layout,
html[data-theme="dark"] .admin-main,
html[data-theme="dark"] .admin-content{
    background:#080f1d!important;
    color:#eef3fa!important;
}
html[data-theme="dark"] .admin-sidebar{
    background:#070d18!important;
    border-right:1px solid #1f2a3c!important;
    color:#eef3fa!important;
}
html[data-theme="dark"] .admin-topbar{
    background:#0f1726!important;
    border-bottom-color:#263247!important;
    color:#eef3fa!important;
    box-shadow:0 8px 24px rgba(0,0,0,.18)!important;
}
html[data-theme="dark"] :is(
    .admin-panel,
    .admin-stat-card,
    .admin-table-wrap,
    .feature-toggle-card,
    .leaderboard-point-card,
    .widget-admin-directory-card,
    .widget-sponsored-preview,
    .system-message-composer,
    .system-message-history-panel,
    .system-message-history-item,
    .system-message-row,
    .widget-order-row,
    .bad-words-context-card,
    .bad-words-info-card,
    .report-information article,
    .report-details-box,
    .reported-content,
    .report-actions-panel,
    .vip-setting-card,
    .captcha-admin-preview,
    .site-logo-preview,
    .api-key-field,
    .api-key-field>div,
    .admin-file-field,
    .video-source-card,
    .left-menu-order-item
){
    background:#111827!important;
    border-color:#2a3850!important;
    color:#eef3fa!important;
    box-shadow:0 12px 34px rgba(0,0,0,.24)!important;
}
html[data-theme="dark"] :is(
    .admin-panel-heading h2,
    .admin-topbar h1,
    .admin-stat-card strong,
    .admin-list-copy strong,
    .feature-toggle-copy strong,
    .widget-admin-directory-copy strong,
    .widget-order-copy strong,
    .system-message-history-item strong,
    .table-user strong,
    .vip-setting-card strong,
    .report-information h3,
    .report-details-box h3,
    .reported-content h3,
    .report-actions-panel h2
){
    color:#f6f8fc!important;
}
html[data-theme="dark"] :is(
    .admin-panel-heading p,
    .admin-topbar p,
    .admin-stat-card small,
    .admin-list-copy small,
    .feature-toggle-copy small,
    .widget-admin-directory-copy small,
    .widget-order-copy small,
    .system-message-history-item small,
    .table-user small,
    .table-subtext,
    .vip-setting-card small,
    .admin-empty,
    .admin-file-field small,
    .api-key-field small,
    .report-information span,
    .report-information small,
    .report-actions-panel>p,
    .left-menu-order-copy small,
    .left-menu-order-toggle small
){
    color:#9aa8bb!important;
}
html[data-theme="dark"] .admin-content [style*="color:#667085"],
html[data-theme="dark"] .admin-content [style*="color: #667085"]{
    color:#9aa8bb!important;
}

/* Lists, rows and tables. */
html[data-theme="dark"] .admin-list-row{
    background:transparent!important;
    border-color:#2a3850!important;
    color:#e8eef7!important;
}
html[data-theme="dark"] .admin-list-row:hover{
    background:#162235!important;
}
html[data-theme="dark"] .admin-table{
    background:#111827!important;
    color:#e8eef7!important;
}
html[data-theme="dark"] .admin-table th{
    background:#151f30!important;
    border-color:#2a3850!important;
    color:#9fb0c6!important;
}
html[data-theme="dark"] .admin-table td{
    background:#111827!important;
    border-color:#2a3850!important;
    color:#e8eef7!important;
}
html[data-theme="dark"] .admin-table tbody tr:hover td{
    background:#162235!important;
}
html[data-theme="dark"] .admin-table a:not(.admin-button){
    color:#82afff!important;
}
html[data-theme="dark"] .admin-table a:not(.admin-button):hover{
    color:#b6d0ff!important;
}

/* All admin form controls, including page-specific controls. */
html[data-theme="dark"] .admin-content :is(
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
    textarea,
    select
),
html[data-theme="dark"] :is(
    .admin-filter-form label,
    .admin-filter-form select,
    .suspend-form input,
    .api-key-field>div,
    .api-key-field input,
    .leaderboard-point-card input,
    .video-source-card>select,
    .widget-position-control select,
    .widget-number-field input,
    .admin-textarea-field textarea,
    .admin-text-field input,
    .system-message-field input,
    .system-message-field textarea,
    .bad-words-field textarea,
    .vip-setting-card select,
    .vip-setting-card input[type="number"]
){
    background:#0f1726!important;
    border-color:#2b3950!important;
    color:#eef3fa!important;
    box-shadow:none!important;
}
html[data-theme="dark"] .video-source-card>select{
    background:
        linear-gradient(45deg,transparent 50%,#9aa8bb 50%)
            calc(100% - 19px) 21px/5px 5px no-repeat,
        linear-gradient(135deg,#9aa8bb 50%,transparent 50%)
            calc(100% - 14px) 21px/5px 5px no-repeat,
        #0f1726!important;
}
html[data-theme="dark"] .admin-content :is(input,textarea,select):focus,
html[data-theme="dark"] :is(
    .admin-filter-form label:focus-within,
    .api-key-field>div:focus-within
){
    background:#111c2d!important;
    border-color:#4f86d9!important;
    box-shadow:0 0 0 3px rgba(48,116,220,.22)!important;
    outline:0!important;
}
html[data-theme="dark"] .admin-content :is(input,textarea)::placeholder{
    color:#718096!important;
}
html[data-theme="dark"] .admin-content select option{
    background:#111827!important;
    color:#eef3fa!important;
}

/* Buttons, pagination, tabs, file selectors and order controls. */
html[data-theme="dark"] :is(
    .admin-button,
    .admin-menu-button,
    .admin-pagination a,
    .report-tabs a,
    .api-key-field button,
    .admin-file-field>strong,
    .widget-order-button,
    .left-menu-order-arrows button,
    .left-menu-drag-handle,
    .vip-users-summary a
){
    background:#182335!important;
    border-color:#2d3b52!important;
    color:#dce3ed!important;
}
html[data-theme="dark"] :is(
    .admin-button:hover,
    .admin-menu-button:hover,
    .admin-pagination a:hover,
    .report-tabs a:hover,
    .api-key-field button:hover,
    .admin-file-field>strong:hover,
    .widget-order-button:hover:not(:disabled),
    .left-menu-order-arrows button:hover:not(:disabled),
    .left-menu-drag-handle:hover,
    .vip-users-summary a:hover
){
    background:#22344d!important;
    border-color:#45658e!important;
    color:#fff!important;
}
html[data-theme="dark"] :is(
    .admin-button.primary-setting-button,
    .admin-filter-form>button,
    .admin-pagination a.active,
    .report-tabs a.active,
    .vip-users-summary a.active,
    .vip-grant,
    .widget-order-save
){
    background:#176bff!important;
    border-color:#176bff!important;
    color:#fff!important;
}
html[data-theme="dark"] :is(
    .admin-button.danger,
    .admin-button.delete-user-button,
    .vip-remove
){
    background:#3a1c23!important;
    border-color:#61303a!important;
    color:#ffb4bd!important;
}
html[data-theme="dark"] .admin-button.success{
    background:#173323!important;
    border-color:#2d5b3c!important;
    color:#9ce6b5!important;
}
html[data-theme="dark"] :is(
    .admin-button.neutral,
    .admin-button.muted-button,
    .admin-pagination .pagination-ellipsis,
    .widget-order-button:disabled
){
    background:#242d3b!important;
    border-color:#394659!important;
    color:#c1cad6!important;
}

/* Navigation and sidebar. */
html[data-theme="dark"] .admin-brand-logo{
    background:#111827!important;
    border-color:#334159!important;
}
html[data-theme="dark"] .admin-brand strong{color:#f6f8fc!important}
html[data-theme="dark"] .admin-brand small{color:#9aa8bb!important}
html[data-theme="dark"] .admin-nav-accordion-button,
html[data-theme="dark"] .admin-nav-accordion-panel a,
html[data-theme="dark"] .admin-sidebar-bottom a{
    background:transparent!important;
    color:#c9d1df!important;
}
html[data-theme="dark"] .admin-nav-accordion-button:hover,
html[data-theme="dark"] .admin-nav-accordion-button.active,
html[data-theme="dark"] .admin-nav-accordion-panel a:hover,
html[data-theme="dark"] .admin-nav-accordion-panel a.active,
html[data-theme="dark"] .admin-sidebar-bottom a:hover{
    background:#263142!important;
    color:#fff!important;
}
html[data-theme="dark"] .admin-nav-accordion-panel a.active{
    background:#176bff!important;
}
html[data-theme="dark"] .admin-nav-accordion-panel{
    background:transparent!important;
    border-left-color:#334159!important;
}
html[data-theme="dark"] .admin-nav-label{color:#8798b0!important}
html[data-theme="dark"] .admin-sidebar-bottom,
html[data-theme="dark"] .admin-nav-label.settings-label{
    border-top-color:#293448!important;
}

/* Neutral informational cards and notes. */
html[data-theme="dark"] :is(
    .leaderboard-admin-note,
    .right-widget-admin-note,
    .left-menu-admin-note,
    .left-menu-order-help,
    .captcha-admin-preview,
    .system-message-note,
    .vip-help,
    .bad-words-info-card
){
    background:#151f30!important;
    border-color:#2b3950!important;
    color:#b9c5d6!important;
}
html[data-theme="dark"] :is(
    .site-logo-preview,
    .widget-sponsored-preview,
    .system-icon-option>span,
    .widget-order-icon,
    .bad-words-context-icon,
    .captcha-admin-preview>span,
    .system-message-note>span,
    .bad-words-info-card>span,
    .admin-list-icon,
    .admin-stat-card>span,
    .widget-admin-directory-icon,
    .leaderboard-point-icon.post,
    .left-menu-order-number,
    .widget-order-number,
    .widget-directory-position,
    .right-widget-admin-status,
    .left-menu-admin-status,
    .left-menu-order-status
){
    background:#172a48!important;
    border-color:#31527e!important;
    color:#82afff!important;
}

/* Semantic accent cards and badges. */
html[data-theme="dark"] :is(
    .status-badge.reviewed,
    .status-badge.verified-status,
    .api-status.configured,
    .security-status-badge,
    .widget-admin-state.enabled,
    .system-message-history-heading span,
    .leaderboard-point-icon.comment,
    .feature-toggle-icon.photo,
    .feature-toggle-icon.widget-online,
    .feature-toggle-icon.left-menu-people
){
    background:#173323!important;
    border-color:#2d5b3c!important;
    color:#9ce6b5!important;
}
html[data-theme="dark"] :is(
    .status-badge.open,
    .api-status.missing,
    .leaderboard-formula-badge,
    .vip-source,
    .vip-admin-badge,
    .feature-toggle-icon.feeling,
    .feature-toggle-icon.left-menu-popular,
    .feature-toggle-icon.left-menu-leaderboard,
    .feature-toggle-icon.widget-announcement
){
    background:#352817!important;
    border-color:#6b4e22!important;
    color:#f6c982!important;
}
html[data-theme="dark"] :is(
    .status-badge.dismissed,
    .status-badge.unverified-status,
    .widget-admin-state.disabled,
    .widget-directory-position
){
    background:#242d3b!important;
    border-color:#394659!important;
    color:#c1cad6!important;
}
html[data-theme="dark"] :is(
    .admin-stat-card.danger>span,
    .leaderboard-point-icon.like,
    .bad-words-count-badge,
    .feature-toggle-icon.bad-words-master-icon,
    .feature-toggle-icon.left-menu-saved,
    .feature-toggle-icon.widget-birthdays
){
    background:#3a1c23!important;
    border-color:#61303a!important;
    color:#ff9ca6!important;
}
html[data-theme="dark"] :is(
    .feature-toggle-icon.video,
    .feature-toggle-icon.gif,
    .leaderboard-point-icon.limit,
    .feature-toggle-icon.left-menu-discover,
    .feature-toggle-icon.widget-sponsored
){
    background:#2c2141!important;
    border-color:#4b376c!important;
    color:#c6a2ff!important;
}
html[data-theme="dark"] :is(
    .feature-toggle-icon.captcha,
    .feature-toggle-icon.widget-people,
    .feature-toggle-icon.left-menu-recent,
    .system-audience-badge,
    .system-icon-option input:checked+span,
    .vip-setting-card>span:first-child
){
    background:#172a48!important;
    border-color:#31527e!important;
    color:#82afff!important;
}

/* Toggle controls remain visible on dark cards. */
html[data-theme="dark"] .toggle-switch,
html[data-theme="dark"] .bad-words-context-card .toggle-switch{
    background:#3b4759!important;
    border-color:#4a586d!important;
}
html[data-theme="dark"] input:checked+.toggle-switch,
html[data-theme="dark"] .toggle-switch.active{
    background:#176bff!important;
    border-color:#176bff!important;
}
html[data-theme="dark"] .toggle-switch::after,
html[data-theme="dark"] .bad-words-context-card .toggle-switch::after{
    background:#f8fafc!important;
    box-shadow:0 2px 7px rgba(0,0,0,.38)!important;
}

/* Hover states for all card directories and order rows. */
html[data-theme="dark"] :is(
    .feature-toggle-card:hover,
    .widget-admin-directory-card:hover,
    .bad-words-context-card:hover,
    .widget-order-row:hover,
    .left-menu-order-item:hover
){
    background:#162235!important;
    border-color:#45658e!important;
}
html[data-theme="dark"] .feature-toggle-card.video-source-card:hover{
    background:#111827!important;
    border-color:#2a3850!important;
}

/* Overlay, scrollbars and native details. */
html[data-theme="dark"] .admin-overlay{
    background:rgba(0,0,0,.68)!important;
}
html[data-theme="dark"] :is(
    body:has(.admin-layout),
    .admin-sidebar,
    .admin-nav-accordion,
    .admin-nav-accordion-panel,
    .admin-table-wrap
){
    scrollbar-color:#46566d #0f1726;
}


/* Manage VIP subscription dark mode */
html[data-theme="dark"] :is(.vip-subscription-detail-grid article,.vip-payment-history-panel,.vip-history-table-wrap,.vip-history-table,.vip-history-empty){background:#111827!important;border-color:#2a3850!important;color:#eef3fa!important}html[data-theme="dark"] .vip-subscription-detail-grid article{background:#151f30!important}html[data-theme="dark"] .vip-subscription-detail-grid article>span{background:#172a48!important;color:#82afff!important}html[data-theme="dark"] .vip-subscription-detail-grid small,html[data-theme="dark"] .vip-history-table td:first-child small{color:#9aa8bb!important}html[data-theme="dark"] .vip-history-table th{background:#151f30!important;border-color:#2a3850!important;color:#9fb0c6!important}html[data-theme="dark"] .vip-history-table td{background:#111827!important;border-color:#2a3850!important;color:#e8eef7!important}html[data-theme="dark"] .vip-history-table tbody tr:hover td{background:#162235!important}html[data-theme="dark"] .vip-history-table code{background:#182335!important;color:#cbd5e1!important}html[data-theme="dark"] .vip-subscription-note.payment-note{background:#151f30!important;border-color:#2b3950!important;color:#c7d2e2!important}html[data-theme="dark"] .vip-subscription-note.payment-note p{color:#9aa8bb!important}html[data-theme="dark"] .vip-subscription-note.points-note{background:#352817!important;border-color:#6b4e22!important;color:#f6c982!important}html[data-theme="dark"] .vip-subscription-note.points-note p{color:#d9c08b!important}html[data-theme="dark"] .vip-subscription-note.manual-note{background:#172a48!important;border-color:#365a8d!important;color:#9ec1ff!important}html[data-theme="dark"] .vip-subscription-note.manual-note p{color:#b8c9df!important}html[data-theme="dark"] .vip-paid-total{background:#172a48!important;color:#82afff!important}html[data-theme="dark"] .vip-history-empty{background:#151f30!important}html[data-theme="dark"] .vip-subscription-status.active{background:#173323!important;color:#9ce6b5!important}html[data-theme="dark"] .vip-subscription-status.inactive{background:#242d3b!important;color:#c1cad6!important}


/* VIP cancellation controls in dark mode */
html[data-theme="dark"] .vip-cancel-subscription-button{background:#3a1c23!important;border-color:#61303a!important;color:#ffb4bd!important}html[data-theme="dark"] .vip-cancel-subscription-button:hover{background:#51242e!important;border-color:#8b4552!important;color:#ffd2d7!important}html[data-theme="dark"] .vip-resume-subscription-button{background:#173323!important;border-color:#2d5b3c!important;color:#9ce6b5!important}html[data-theme="dark"] .vip-resume-subscription-button:hover{background:#20462f!important;border-color:#3e7951!important;color:#c4f5d4!important}html[data-theme="dark"] .vip-subscription-note.cancellation-note{background:#352817!important;border-color:#6b4e22!important;color:#f6c982!important}html[data-theme="dark"] .vip-subscription-note.cancellation-note p{color:#d9c08b!important}

/* Become VIP master control in admin dark mode. */
html[data-theme="dark"] .vip-master-control{
    background:linear-gradient(135deg,#111827,#151f30)!important;
    border-color:#334a70!important;
    color:#eef3fa!important;
    box-shadow:0 12px 34px rgba(0,0,0,.28)!important;
}
html[data-theme="dark"] .vip-master-control>span:first-child{
    background:#176bff!important;
    color:#fff!important;
}
html[data-theme="dark"] .vip-master-control h2{
    color:#f6f8fc!important;
}
html[data-theme="dark"] .vip-master-control p{
    color:#9aa8bb!important;
}
html[data-theme="dark"] .vip-master-switch{
    background:#0f1726!important;
    border-color:#334159!important;
    color:#eef3fa!important;
}
html[data-theme="dark"] .vip-master-state{
    color:#82afff!important;
}
html[data-theme="dark"] .vip-system-off-note{
    background:#352817!important;
    border:1px solid #6b4e22!important;
    color:#f6c982!important;
}
