/* =========================================================
   PERISTIWAPALU - DARK MODE TERPADU
   File ini dimuat paling akhir agar tema berlaku konsisten
   pada halaman publik, autentikasi, foto, artikel, dan admin.
========================================================= */

:is(html.theme-dark body, body.dark-mode) {
    --page: #0b1120;
    --page-bg: #0b1120;
    --surface: #151d31;
    --surface-strong: #1b2740;
    --soft-surface: #10192c;
    --text: #eef3ff;
    --muted: #aab5ca;
    --border: #2c3a56;
    --blue-soft: #202b56;
    --pp-ink: #eef3ff;
    --pp-muted: #aab5ca;
    --pp-border: #2c3a56;
    --pp-surface: #151d31;
    --pp-soft: #0b1120;
    color-scheme: dark;
    background: var(--page);
    color: var(--text);
}

:is(html.theme-dark body, body.dark-mode)::selection {
    background: #526dff;
    color: #ffffff;
}

:is(html.theme-dark, body.dark-mode) {
    color-scheme: dark;
}

/* Header publik dan navigasi */
:is(html.theme-dark, body.dark-mode) .site-header,
:is(html.theme-dark, body.dark-mode) .category-nav {
    background: #111a2e;
    border-color: #293750;
    color: #eef3ff;
}

:is(html.theme-dark, body.dark-mode) .header-container,
:is(html.theme-dark, body.dark-mode) .category-container {
    color: #eef3ff;
}

:is(html.theme-dark, body.dark-mode) .search-box {
    background: #202b43;
    border-color: #344360;
    box-shadow: none;
}

:is(html.theme-dark, body.dark-mode) .search-box input,
:is(html.theme-dark, body.dark-mode) .search-box input::placeholder {
    color: #eef3ff;
}

:is(html.theme-dark, body.dark-mode) .search-box input::placeholder {
    color: #a9b4c9;
}

:is(html.theme-dark, body.dark-mode) .search-box i,
:is(html.theme-dark, body.dark-mode) .category-item,
:is(html.theme-dark, body.dark-mode) .category-menu-link,
:is(html.theme-dark, body.dark-mode) .dynamic-category-link {
    color: #dbe4f6;
}

:is(html.theme-dark, body.dark-mode) .category-item:hover,
:is(html.theme-dark, body.dark-mode) .category-item.active,
:is(html.theme-dark, body.dark-mode) .category-menu-link:hover,
:is(html.theme-dark, body.dark-mode) .dynamic-category-link:hover {
    color: #ffffff;
    background: #202b56;
}

:is(html.theme-dark, body.dark-mode) .category-submenu {
    background: #151f35;
    border-color: #33425f;
    box-shadow: 0 18px 42px rgba(0, 0, 0, .32);
}

:is(html.theme-dark, body.dark-mode) .category-submenu a {
    color: #dbe4f6;
}

:is(html.theme-dark, body.dark-mode) .category-submenu a:hover {
    background: #202b56;
    color: #ffffff;
}

:is(html.theme-dark, body.dark-mode) .icon-button,
:is(html.theme-dark, body.dark-mode) .site-header .login-button,
:is(html.theme-dark, body.dark-mode) .site-header .logout-button {
    color: #eef3ff;
}

:is(html.theme-dark, body.dark-mode) .icon-button:hover,
:is(html.theme-dark, body.dark-mode) .site-header .login-button:hover,
:is(html.theme-dark, body.dark-mode) .site-header .logout-button:hover {
    background: #202b56;
}

:is(html.theme-dark, body.dark-mode) .write-button,
:is(html.theme-dark, body.dark-mode) .search-button {
    color: #ffffff;
}

/* Halaman depan, kartu, dan bagian engagement */
:is(html.theme-dark, body.dark-mode) .news-home,
:is(html.theme-dark, body.dark-mode) .news-home-container,
:is(html.theme-dark, body.dark-mode) .headline-section,
:is(html.theme-dark, body.dark-mode) .sorotan-section,
:is(html.theme-dark, body.dark-mode) .engagement-section,
:is(html.theme-dark, body.dark-mode) .latest-opinion-section,
:is(html.theme-dark, body.dark-mode) .popular-section,
:is(html.theme-dark, body.dark-mode) .recommendation-section,
:is(html.theme-dark, body.dark-mode) .foto-pilihan-section,
:is(html.theme-dark, body.dark-mode) .after-sorotan-section,
:is(html.theme-dark, body.dark-mode) .category-news-section {
    background: var(--page);
    color: var(--text);
}

:is(html.theme-dark, body.dark-mode) .headline-slider,
:is(html.theme-dark, body.dark-mode) .popular-list,
:is(html.theme-dark, body.dark-mode) .sorotan-card,
:is(html.theme-dark, body.dark-mode) .sorotan-card-body,
:is(html.theme-dark, body.dark-mode) .polling-card,
:is(html.theme-dark, body.dark-mode) .follow-us-card,
:is(html.theme-dark, body.dark-mode) .recommendation-list,
:is(html.theme-dark, body.dark-mode) .latest-opinion-list,
:is(html.theme-dark, body.dark-mode) .foto-pilihan-card,
:is(html.theme-dark, body.dark-mode) .foto-pilihan-card--mini,
:is(html.theme-dark, body.dark-mode) .foto-pilihan-card--utama {
    background: var(--surface);
    border-color: var(--border);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
}

:is(html.theme-dark, body.dark-mode) .section-title-unified,
:is(html.theme-dark, body.dark-mode) .section-heading h2,
:is(html.theme-dark, body.dark-mode) .section-heading h3,
:is(html.theme-dark, body.dark-mode) .polling-card h2,
:is(html.theme-dark, body.dark-mode) .polling-card h3,
:is(html.theme-dark, body.dark-mode) .popular-item strong,
:is(html.theme-dark, body.dark-mode) .recommendation-list h3,
:is(html.theme-dark, body.dark-mode) .latest-opinion-item h3,
:is(html.theme-dark, body.dark-mode) .sorotan-card-body h3 {
    color: var(--text);
}

:is(html.theme-dark, body.dark-mode) .section-kicker,
:is(html.theme-dark, body.dark-mode) .section-heading p,
:is(html.theme-dark, body.dark-mode) .polling-card p,
:is(html.theme-dark, body.dark-mode) .popular-item small,
:is(html.theme-dark, body.dark-mode) .latest-opinion-item p,
:is(html.theme-dark, body.dark-mode) .recommendation-list p,
:is(html.theme-dark, body.dark-mode) .sorotan-meta,
:is(html.theme-dark, body.dark-mode) .headline-meta {
    color: var(--muted);
}

:is(html.theme-dark, body.dark-mode) .popular-item,
:is(html.theme-dark, body.dark-mode) .latest-opinion-item,
:is(html.theme-dark, body.dark-mode) .recommendation-item,
:is(html.theme-dark, body.dark-mode) .category-news-item,
:is(html.theme-dark, body.dark-mode) .polling-option,
:is(html.theme-dark, body.dark-mode) .polling-choice {
    border-color: var(--border);
}

:is(html.theme-dark, body.dark-mode) .polling-option,
:is(html.theme-dark, body.dark-mode) .polling-choice {
    background: #10192c;
    color: var(--text);
}

:is(html.theme-dark, body.dark-mode) .polling-option:hover,
:is(html.theme-dark, body.dark-mode) .polling-choice:hover,
:is(html.theme-dark, body.dark-mode) .polling-option.selected,
:is(html.theme-dark, body.dark-mode) .polling-choice.selected {
    background: #202b56;
    border-color: #6578ff;
}

:is(html.theme-dark, body.dark-mode) .polling-percentage,
:is(html.theme-dark, body.dark-mode) .polling-card small,
:is(html.theme-dark, body.dark-mode) .polling-card .polling-note {
    color: var(--muted);
}

:is(html.theme-dark, body.dark-mode) .headline-arrow,
:is(html.theme-dark, body.dark-mode) .footer-back-top {
    background: #202b56;
    border-color: #3b4d70;
    color: #ffffff;
}

:is(html.theme-dark, body.dark-mode) .empty-state,
:is(html.theme-dark, body.dark-mode) .news-empty-state,
:is(html.theme-dark, body.dark-mode) .photo-page-empty {
    background: #151d31;
    border-color: var(--border);
    color: var(--muted);
}

/* Kartu berita umum, kategori, pencarian, dan daftar foto */
:is(html.theme-dark, body.dark-mode) .news-page-container,
:is(html.theme-dark, body.dark-mode) .category-page,
:is(html.theme-dark, body.dark-mode) .category-page-container,
:is(html.theme-dark, body.dark-mode) .photo-page,
:is(html.theme-dark, body.dark-mode) .photo-page-container,
:is(html.theme-dark, body.dark-mode) .search-page,
:is(html.theme-dark, body.dark-mode) .search-page-container {
    background: var(--page);
    color: var(--text);
}

:is(html.theme-dark, body.dark-mode) .news-card,
:is(html.theme-dark, body.dark-mode) .news-article,
:is(html.theme-dark, body.dark-mode) .category-featured-card,
:is(html.theme-dark, body.dark-mode) .category-horizontal-card,
:is(html.theme-dark, body.dark-mode) .category-mini-card,
:is(html.theme-dark, body.dark-mode) .category-spotlight-card,
:is(html.theme-dark, body.dark-mode) .category-popular-panel,
:is(html.theme-dark, body.dark-mode) .category-follow-card,
:is(html.theme-dark, body.dark-mode) .photo-page-card,
:is(html.theme-dark, body.dark-mode) .search-results-panel,
:is(html.theme-dark, body.dark-mode) .search-filter-form,
:is(html.theme-dark, body.dark-mode) .search-sidebar-card,
:is(html.theme-dark, body.dark-mode) .search-popular-card,
:is(html.theme-dark, body.dark-mode) .search-recommendation-card,
:is(html.theme-dark, body.dark-mode) .search-follow-card {
    background: var(--surface);
    border-color: var(--border);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .16);
}

:is(html.theme-dark, body.dark-mode) .news-card-body,
:is(html.theme-dark, body.dark-mode) .news-card h2,
:is(html.theme-dark, body.dark-mode) .news-card h3,
:is(html.theme-dark, body.dark-mode) .category-page-heading h1,
:is(html.theme-dark, body.dark-mode) .category-section-heading h2,
:is(html.theme-dark, body.dark-mode) .category-horizontal-copy h3,
:is(html.theme-dark, body.dark-mode) .category-popular-copy strong,
:is(html.theme-dark, body.dark-mode) .photo-page-heading h1,
:is(html.theme-dark, body.dark-mode) .photo-page-card-copy h3,
:is(html.theme-dark, body.dark-mode) .search-page-heading h1,
:is(html.theme-dark, body.dark-mode) .search-result-copy h2,
:is(html.theme-dark, body.dark-mode) .search-sidebar-card-heading,
:is(html.theme-dark, body.dark-mode) .search-popular-copy strong {
    color: var(--text);
}

:is(html.theme-dark, body.dark-mode) .news-meta,
:is(html.theme-dark, body.dark-mode) .category-featured-meta,
:is(html.theme-dark, body.dark-mode) .category-horizontal-meta,
:is(html.theme-dark, body.dark-mode) .category-mini-meta,
:is(html.theme-dark, body.dark-mode) .category-page-kicker,
:is(html.theme-dark, body.dark-mode) .category-section-kicker,
:is(html.theme-dark, body.dark-mode) .photo-page-sidebar-label,
:is(html.theme-dark, body.dark-mode) .search-page-eyebrow,
:is(html.theme-dark, body.dark-mode) .search-result-meta,
:is(html.theme-dark, body.dark-mode) .search-result-copy p,
:is(html.theme-dark, body.dark-mode) .search-popular-copy small,
:is(html.theme-dark, body.dark-mode) .search-recommendation-item small {
    color: var(--muted);
}

:is(html.theme-dark, body.dark-mode) .news-card,
:is(html.theme-dark, body.dark-mode) .search-result-item,
:is(html.theme-dark, body.dark-mode) .category-feed-list,
:is(html.theme-dark, body.dark-mode) .category-horizontal-card,
:is(html.theme-dark, body.dark-mode) .photo-page-card {
    border-color: var(--border);
}

:is(html.theme-dark, body.dark-mode) .search-result-item,
:is(html.theme-dark, body.dark-mode) .category-feed-list > *,
:is(html.theme-dark, body.dark-mode) .search-popular-item,
:is(html.theme-dark, body.dark-mode) .search-recommendation-item {
    border-bottom-color: var(--border);
}

:is(html.theme-dark, body.dark-mode) .search-filter-field input,
:is(html.theme-dark, body.dark-mode) .search-filter-field select,
:is(html.theme-dark, body.dark-mode) .search-filter-field,
:is(html.theme-dark, body.dark-mode) .search-page input,
:is(html.theme-dark, body.dark-mode) .search-page select,
:is(html.theme-dark, body.dark-mode) .search-page textarea,
:is(html.theme-dark, body.dark-mode) .photo-page-button {
    background: #10192c;
    border-color: #344360;
    color: var(--text);
}

:is(html.theme-dark, body.dark-mode) .search-filter-field input::placeholder,
:is(html.theme-dark, body.dark-mode) .search-page input::placeholder {
    color: #9aa8c0;
}

:is(html.theme-dark, body.dark-mode) .search-filter-field input[type="date"] {
    color-scheme: dark;
}

:is(html.theme-dark, body.dark-mode) .search-popular-item > span,
:is(html.theme-dark, body.dark-mode) .category-popular-item > span,
:is(html.theme-dark, body.dark-mode) .search-popular-item .number {
    background: #202b56;
    color: #dce4ff;
}

:is(html.theme-dark, body.dark-mode) .search-result-copy mark {
    background: #5a3f3a;
    color: #ffe7d9;
}

:is(html.theme-dark, body.dark-mode) .category-featured-content,
:is(html.theme-dark, body.dark-mode) .category-featured-link,
:is(html.theme-dark, body.dark-mode) .category-spotlight-link {
    color: #ffffff;
}

:is(html.theme-dark, body.dark-mode) .category-featured-card::before,
:is(html.theme-dark, body.dark-mode) .category-spotlight-card::before,
:is(html.theme-dark, body.dark-mode) .photo-page-featured-overlay {
    opacity: .78;
}

/* Artikel / baca berita */
:is(html.theme-dark, body.dark-mode) .news-reader-page,
:is(html.theme-dark, body.dark-mode) .reader-section,
:is(html.theme-dark, body.dark-mode) .reader-comment-form,
:is(html.theme-dark, body.dark-mode) .reader-side-card,
:is(html.theme-dark, body.dark-mode) .reader-recommended-card,
:is(html.theme-dark, body.dark-mode) .reader-ad-card {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}

:is(html.theme-dark, body.dark-mode) .reader-article-header,
:is(html.theme-dark, body.dark-mode) .reader-article-content,
:is(html.theme-dark, body.dark-mode) .reader-story-text,
:is(html.theme-dark, body.dark-mode) .reader-comment-item,
:is(html.theme-dark, body.dark-mode) .reader-opinion-list,
:is(html.theme-dark, body.dark-mode) .reader-baca-juga-list {
    border-color: var(--border);
}

:is(html.theme-dark, body.dark-mode) .reader-article-header h1,
:is(html.theme-dark, body.dark-mode) .reader-section-heading h2,
:is(html.theme-dark, body.dark-mode) .reader-side-card h3,
:is(html.theme-dark, body.dark-mode) .reader-recommended-card h3,
:is(html.theme-dark, body.dark-mode) .reader-story-text,
:is(html.theme-dark, body.dark-mode) .reader-comment-copy p,
:is(html.theme-dark, body.dark-mode) .reader-baca-juga-title {
    color: var(--text);
}

:is(html.theme-dark, body.dark-mode) .reader-meta-row,
:is(html.theme-dark, body.dark-mode) .reader-author-copy small,
:is(html.theme-dark, body.dark-mode) .reader-comment-meta,
:is(html.theme-dark, body.dark-mode) .reader-section-kicker,
:is(html.theme-dark, body.dark-mode) .reader-tags-label {
    color: var(--muted);
}

:is(html.theme-dark, body.dark-mode) .reader-comment-form textarea,
:is(html.theme-dark, body.dark-mode) .reader-comment-form input,
:is(html.theme-dark, body.dark-mode) .reader-share-menu-item,
:is(html.theme-dark, body.dark-mode) .reader-tags-list a {
    background: #10192c;
    border-color: #344360;
    color: var(--text);
}

:is(html.theme-dark, body.dark-mode) .reader-share-menu-item:hover,
:is(html.theme-dark, body.dark-mode) .reader-tags-list a:hover {
    background: #202b56;
}

:is(html.theme-dark, body.dark-mode) .follow-us-card,
:is(html.theme-dark, body.dark-mode) .reader-follow-card {
    background: #18233a;
    border-color: var(--border);
}

/* Halaman foto: panggung tetap hitam, panel informasi mengikuti tema */
:is(html.theme-dark, body.dark-mode) .photo-page-sidebar,
:is(html.theme-dark, body.dark-mode) .photo-page-sidebar-sticky,
:is(html.theme-dark, body.dark-mode) .photo-gallery-info,
:is(html.theme-dark, body.dark-mode) .photo-gallery-latest,
:is(html.theme-dark, body.dark-mode) .photo-gallery-latest-card {
    background: #151d31;
    border-color: var(--border);
    color: var(--text);
}

:is(html.theme-dark, body.dark-mode) .photo-gallery-story-copy h1,
:is(html.theme-dark, body.dark-mode) .photo-gallery-story-copy h2,
:is(html.theme-dark, body.dark-mode) .photo-gallery-section-heading h2,
:is(html.theme-dark, body.dark-mode) .photo-gallery-latest-card h3 {
    color: var(--text);
}

:is(html.theme-dark, body.dark-mode) .photo-gallery-story-meta,
:is(html.theme-dark, body.dark-mode) .photo-gallery-tags,
:is(html.theme-dark, body.dark-mode) .photo-gallery-latest-card time {
    color: var(--muted);
}

:is(html.theme-dark, body.dark-mode) .photo-gallery-read-button {
    background: #2638b8;
    color: #ffffff;
}

/* Profil, kirim berita, dan komponen form publik */
:is(html.theme-dark, body.dark-mode) .public-page-container,
:is(html.theme-dark, body.dark-mode) .profile-card,
:is(html.theme-dark, body.dark-mode) .profile-identity-card,
:is(html.theme-dark, body.dark-mode) .profile-notification-card,
:is(html.theme-dark, body.dark-mode) .profile-articles-card,
:is(html.theme-dark, body.dark-mode) .public-form-card,
:is(html.theme-dark, body.dark-mode) .admin-simple-card,
:is(html.theme-dark, body.dark-mode) .live-news-card {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .16);
}

:is(html.theme-dark, body.dark-mode) .public-page-heading h1,
:is(html.theme-dark, body.dark-mode) .profile-identity-copy h1,
:is(html.theme-dark, body.dark-mode) .profile-section-heading h2,
:is(html.theme-dark, body.dark-mode) .profile-stat-card strong,
:is(html.theme-dark, body.dark-mode) .public-form-card h2,
:is(html.theme-dark, body.dark-mode) .live-news-card-body h3,
:is(html.theme-dark, body.dark-mode) .news-shell-header h1 {
    color: var(--text);
}

:is(html.theme-dark, body.dark-mode) .public-page-heading p,
:is(html.theme-dark, body.dark-mode) .profile-identity-copy p,
:is(html.theme-dark, body.dark-mode) .profile-stat-card span,
:is(html.theme-dark, body.dark-mode) .profile-article-copy small,
:is(html.theme-dark, body.dark-mode) .public-form-notice,
:is(html.theme-dark, body.dark-mode) .inline-help,
:is(html.theme-dark, body.dark-mode) .live-news-card-body p {
    color: var(--muted);
}

:is(html.theme-dark, body.dark-mode) .public-field input,
:is(html.theme-dark, body.dark-mode) .public-field select,
:is(html.theme-dark, body.dark-mode) .public-field textarea,
:is(html.theme-dark, body.dark-mode) .admin-field input,
:is(html.theme-dark, body.dark-mode) .admin-field select,
:is(html.theme-dark, body.dark-mode) .admin-field textarea,
:is(html.theme-dark, body.dark-mode) .file-dropzone,
:is(html.theme-dark, body.dark-mode) .image-upload-field {
    background: #10192c;
    border-color: #344360;
    color: var(--text);
}

:is(html.theme-dark, body.dark-mode) .public-field input::placeholder,
:is(html.theme-dark, body.dark-mode) .public-field textarea::placeholder,
:is(html.theme-dark, body.dark-mode) .admin-field input::placeholder,
:is(html.theme-dark, body.dark-mode) .admin-field textarea::placeholder {
    color: #91a0ba;
}

:is(html.theme-dark, body.dark-mode) .public-field label,
:is(html.theme-dark, body.dark-mode) .admin-field label,
:is(html.theme-dark, body.dark-mode) .file-dropzone-copy,
:is(html.theme-dark, body.dark-mode) .file-dropzone-button {
    color: var(--text);
}

:is(html.theme-dark, body.dark-mode) .public-button-light,
:is(html.theme-dark, body.dark-mode) .admin-button,
:is(html.theme-dark, body.dark-mode) .button-secondary,
:is(html.theme-dark, body.dark-mode) .live-news-card-link {
    background: #202b43;
    border-color: #3b4c6d;
    color: #eef3ff;
}

:is(html.theme-dark, body.dark-mode) .public-button-light:hover,
:is(html.theme-dark, body.dark-mode) .admin-button:hover,
:is(html.theme-dark, body.dark-mode) .button-secondary:hover,
:is(html.theme-dark, body.dark-mode) .live-news-card-link:hover {
    background: #2a3960;
}

:is(html.theme-dark, body.dark-mode) .profile-article-row,
:is(html.theme-dark, body.dark-mode) .profile-card-actions,
:is(html.theme-dark, body.dark-mode) .public-form-footer,
:is(html.theme-dark, body.dark-mode) .admin-table th,
:is(html.theme-dark, body.dark-mode) .admin-table td {
    border-color: var(--border);
}

:is(html.theme-dark, body.dark-mode) .profile-photo-editor,
:is(html.theme-dark, body.dark-mode) .profile-form-field input.profile-form-readonly {
    background: #10192c;
    border-color: var(--border);
}

:is(html.theme-dark, body.dark-mode) .profile-form-field input,
:is(html.theme-dark, body.dark-mode) .profile-photo-copy input[type="file"] {
    background: #10192c;
    border-color: #344360;
    color: var(--text);
}

:is(html.theme-dark, body.dark-mode) .profile-form-field input::placeholder {
    color: #91a0ba;
}

:is(html.theme-dark, body.dark-mode) .profile-form-label,
:is(html.theme-dark, body.dark-mode) .profile-form-section-heading h2 {
    color: var(--text);
}

:is(html.theme-dark, body.dark-mode) .profile-form-lock,
:is(html.theme-dark, body.dark-mode) .profile-form-optional {
    border-color: var(--border);
    color: var(--muted);
}

:is(html.theme-dark, body.dark-mode) .profile-form-errors {
    border-color: #7e3a52;
    background: #411f2d;
    color: #ffadbf;
}

body.admin-dark .admin-profile-role-badge,
body.admin-dark .admin-profile-security-note {
    border-color: #33405d;
    background: #182441;
    color: #aebbd6;
}

body.admin-dark .admin-profile-security-note strong {
    color: #bcd0ff;
}

/* Pagination */
:is(html.theme-dark, body.dark-mode) .pagination-wrap,
:is(html.theme-dark, body.dark-mode) .site-pagination-links {
    color: var(--muted);
}

:is(html.theme-dark, body.dark-mode) .site-page-link,
:is(html.theme-dark, body.dark-mode) .site-page-number,
:is(html.theme-dark, body.dark-mode) .site-page-ellipsis {
    background: #151f35;
    border-color: #344360;
    color: #dbe4f6;
}

:is(html.theme-dark, body.dark-mode) .site-page-link:hover,
:is(html.theme-dark, body.dark-mode) .site-page-number:hover,
:is(html.theme-dark, body.dark-mode) .site-page-number.is-active,
:is(html.theme-dark, body.dark-mode) .site-page-link.is-active {
    background: #303fbd;
    border-color: #6b7bff;
    color: #ffffff;
}

/* Footer */
:is(html.theme-dark, body.dark-mode) .site-footer {
    background: #080e20;
    border-color: #26334e;
    color: #dce5f6;
}

:is(html.theme-dark, body.dark-mode) .footer-kicker,
:is(html.theme-dark, body.dark-mode) .footer-links-column a,
:is(html.theme-dark, body.dark-mode) .footer-legal,
:is(html.theme-dark, body.dark-mode) .footer-made,
:is(html.theme-dark, body.dark-mode) .footer-newsletter-copy p {
    color: #aebbd0;
}

:is(html.theme-dark, body.dark-mode) .footer-subscribe-field {
    background: #151d31;
    border-color: #344360;
}

:is(html.theme-dark, body.dark-mode) .footer-subscribe-field input {
    color: #eef3ff;
}

/* Login dan pendaftaran */
:is(html.theme-dark, body.dark-mode) .login-form-section {
    background: #0b1120;
}

:is(html.theme-dark, body.dark-mode) .login-card {
    background: #151d31;
    border-color: #2d3c59;
    box-shadow: 0 22px 70px rgba(0, 0, 0, .34);
}

:is(html.theme-dark, body.dark-mode) .login-heading h2,
:is(html.theme-dark, body.dark-mode) .field-label,
:is(html.theme-dark, body.dark-mode) .form-options,
:is(html.theme-dark, body.dark-mode) .remember-option,
:is(html.theme-dark, body.dark-mode) .login-divider,
:is(html.theme-dark, body.dark-mode) .login-card .register-copy {
    color: #eef3ff;
}

:is(html.theme-dark, body.dark-mode) .login-heading p,
:is(html.theme-dark, body.dark-mode) .forgot-button,
:is(html.theme-dark, body.dark-mode) .field-message,
:is(html.theme-dark, body.dark-mode) .login-card small {
    color: #aab5ca;
}

:is(html.theme-dark, body.dark-mode) .input-wrapper {
    background: #10192c;
    border-color: #344360;
}

:is(html.theme-dark, body.dark-mode) .input-wrapper input,
:is(html.theme-dark, body.dark-mode) .input-wrapper input::placeholder,
:is(html.theme-dark, body.dark-mode) .password-button,
:is(html.theme-dark, body.dark-mode) .theme-button {
    color: #eef3ff;
}

:is(html.theme-dark, body.dark-mode) .input-wrapper input::placeholder {
    color: #91a0ba;
}

:is(html.theme-dark, body.dark-mode) .theme-button,
:is(html.theme-dark, body.dark-mode) .register-button {
    background: #202b43;
    border-color: #3b4c6d;
}

:is(html.theme-dark, body.dark-mode) .theme-button:hover,
:is(html.theme-dark, body.dark-mode) .register-button:hover {
    background: #2a3960;
}

:is(html.theme-dark, body.dark-mode) .demo-notice,
:is(html.theme-dark, body.dark-mode) .server-info {
    background: #182a48;
    border-color: #3a5f95;
    color: #c9dcff;
}

:is(html.theme-dark, body.dark-mode) .server-error {
    background: #3a1e2b;
    border-color: #814052;
    color: #ffd4dc;
}

/* SweetAlert dan flash message */
:is(html.theme-dark, body.dark-mode) .swal2-popup,
:is(html.theme-dark, body.dark-mode) .swal-button {
    background: #151d31;
    color: #eef3ff;
}

:is(html.theme-dark, body.dark-mode) .swal2-title,
:is(html.theme-dark, body.dark-mode) .swal2-html-container {
    color: #eef3ff;
}

:is(html.theme-dark, body.dark-mode) .swal2-input,
:is(html.theme-dark, body.dark-mode) .swal2-textarea,
:is(html.theme-dark, body.dark-mode) .swal2-select {
    background: #10192c;
    border-color: #344360;
    color: #eef3ff;
}

:is(html.theme-dark, body.dark-mode) .site-flash,
:is(html.theme-dark, body.dark-mode) .flash-message {
    background: #18233a;
    border-color: #344360;
    color: #eef3ff;
}

/* =========================================================
   ADMIN DASHBOARD
========================================================= */

body.admin-dark {
    --admin-bg: #0b1120;
    --admin-surface: #151d31;
    --admin-border: #2c3a56;
    --admin-text: #eef3ff;
    --admin-muted: #aab5ca;
    --admin-blue: #5368f4;
    --admin-blue-2: #8fa3ff;
    --admin-orange: #ffae2b;
    color-scheme: dark;
    background: var(--admin-bg);
    color: var(--admin-text);
}

body.admin-dark .admin-app,
body.admin-dark .admin-workspace,
body.admin-dark .admin-content,
body.admin-dark .admin-simple-container {
    background: var(--admin-bg);
    color: var(--admin-text);
}

body.admin-dark .admin-sidebar {
    background: #080d25;
    border-color: #202b4b;
}

body.admin-dark .admin-topbar,
body.admin-dark .admin-simple-header {
    background: var(--admin-surface);
    border-color: var(--admin-border);
    color: var(--admin-text);
}

body.admin-dark .admin-brand,
body.admin-dark .sidebar-link,
body.admin-dark .sidebar-label,
body.admin-dark .sidebar-footer,
body.admin-dark .admin-simple-header a {
    color: #dbe4f6;
}

body.admin-dark .sidebar-link:hover,
body.admin-dark .sidebar-link.active {
    background: #202b56;
    color: #ffffff;
}

body.admin-dark .sidebar-link.active::before {
    background: #ffae2b;
}

body.admin-dark .admin-search,
body.admin-dark .inline-search-field,
body.admin-dark .panel-head select,
body.admin-dark .admin-field input,
body.admin-dark .admin-field select,
body.admin-dark .admin-field textarea,
body.admin-dark .inline-field input,
body.admin-dark .inline-field select,
body.admin-dark .inline-field textarea,
body.admin-dark .admin-settings-field input,
body.admin-dark .admin-settings-field select,
body.admin-dark .admin-settings-field textarea {
    background: #10192c;
    border-color: #344360;
    color: var(--admin-text);
}

body.admin-dark .admin-search input,
body.admin-dark .inline-search-field input,
body.admin-dark .admin-field input::placeholder,
body.admin-dark .admin-field textarea::placeholder,
body.admin-dark .inline-field input::placeholder,
body.admin-dark .inline-field textarea::placeholder {
    color: #aab5ca;
}

body.admin-dark .topbar-icon,
body.admin-dark .button-secondary,
body.admin-dark .table-action,
body.admin-dark .admin-button,
body.admin-dark .file-dropzone-button {
    background: #1c2841;
    border-color: #3b4c6d;
    color: #eef3ff;
}

body.admin-dark .topbar-icon:hover,
body.admin-dark .button-secondary:hover,
body.admin-dark .table-action:hover,
body.admin-dark .admin-button:hover,
body.admin-dark .file-dropzone-button:hover {
    background: #293a63;
}

body.admin-dark .stat-card,
body.admin-dark .panel,
body.admin-dark .module-placeholder-panel,
body.admin-dark .inline-news-panel,
body.admin-dark .inline-form-panel,
body.admin-dark .visitor-review-panel,
body.admin-dark .admin-settings-panel,
body.admin-dark .admin-module-card,
body.admin-dark .admin-media-panel,
body.admin-dark .admin-polling-card,
body.admin-dark .admin-photo-panel,
body.admin-dark .admin-follow-preview,
body.admin-dark .admin-simple-card {
    background: var(--admin-surface);
    border-color: var(--admin-border);
    color: var(--admin-text);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .16);
}

body.admin-dark h1,
body.admin-dark h2,
body.admin-dark h3,
body.admin-dark h4,
body.admin-dark strong,
body.admin-dark label,
body.admin-dark .panel-head h2,
body.admin-dark .inline-page-head h1,
body.admin-dark .module-placeholder-copy h2,
body.admin-dark .welcome-row h1,
body.admin-dark .table-news strong {
    color: var(--admin-text);
}

body.admin-dark p,
body.admin-dark small,
body.admin-dark .muted-note,
body.admin-dark .panel-head p,
body.admin-dark .welcome-row p,
body.admin-dark .inline-page-head p,
body.admin-dark .inline-field-help,
body.admin-dark .module-placeholder-copy p,
body.admin-dark .module-placeholder-meta strong,
body.admin-dark .stat-card p,
body.admin-dark .stat-card small,
body.admin-dark .activity-item time,
body.admin-dark .source-label,
body.admin-dark .visitor-review-copy small,
body.admin-dark .visitor-review-empty {
    color: var(--admin-muted);
}

body.admin-dark .stat-card.blue .stat-icon,
body.admin-dark .quick-item.blue > i,
body.admin-dark .module-placeholder-icon.blue,
body.admin-dark .thumb-blue,
body.admin-dark .activity-icon.blue {
    background: #1b2b58;
    color: #9db1ff;
}

body.admin-dark .stat-card.orange .stat-icon,
body.admin-dark .quick-item.orange > i,
body.admin-dark .module-placeholder-icon.orange,
body.admin-dark .thumb-orange,
body.admin-dark .activity-icon.orange {
    background: #45321b;
    color: #ffbd58;
}

body.admin-dark .stat-card.purple .stat-icon,
body.admin-dark .quick-item.purple > i,
body.admin-dark .module-placeholder-icon.purple,
body.admin-dark .thumb-purple,
body.admin-dark .activity-icon.purple {
    background: #30234f;
    color: #c5a6ff;
}

body.admin-dark .stat-card.green .stat-icon,
body.admin-dark .quick-item.green > i,
body.admin-dark .module-placeholder-icon.green,
body.admin-dark .thumb-green,
body.admin-dark .activity-icon.green {
    background: #173c34;
    color: #7ce0b0;
}

body.admin-dark .quick-item,
body.admin-dark .visitor-review-item,
body.admin-dark .activity-item,
body.admin-dark .module-placeholder-meta,
body.admin-dark .news-table th,
body.admin-dark .news-table td,
body.admin-dark .admin-table th,
body.admin-dark .admin-table td,
body.admin-dark .admin-form-footer,
body.admin-dark .admin-card-footer {
    border-color: var(--admin-border);
}

body.admin-dark .quick-item:hover {
    border-color: #6578ff;
}

body.admin-dark .publish-meter,
body.admin-dark .bar,
body.admin-dark .meter,
body.admin-dark .inline-form-side,
body.admin-dark .admin-form-side,
body.admin-dark .admin-filter-bar,
body.admin-dark .admin-table-wrap {
    background: #10192c;
    border-color: var(--admin-border);
}

body.admin-dark .status.published,
body.admin-dark .table-action.approve,
body.admin-dark .visitor-review-notice,
body.admin-dark .visitor-review-heading-badge {
    background: #15372d;
    border-color: #2c7256;
    color: #91edbd;
}

body.admin-dark .status.review,
body.admin-dark .visitor-review-icon {
    background: #45321b;
    color: #ffbd58;
}

body.admin-dark .status.draft {
    background: #273149;
    color: #bac5d9;
}

body.admin-dark .status.rejected,
body.admin-dark .table-action.reject {
    background: #411f2d;
    border-color: #7e3a52;
    color: #ffadbf;
}

body.admin-dark .inline-feedback,
body.admin-dark .toast {
    background: #18233a;
    border-color: var(--admin-border);
    color: var(--admin-text);
}

body.admin-dark .inline-feedback.success {
    background: #15372d;
    border-color: #2c7256;
    color: #91edbd;
}

body.admin-dark .inline-feedback.error {
    background: #311d29;
    border-color: #6b3a42;
    color: #ffb7b1;
}

body.admin-dark .inline-feedback.error i {
    color: #ff8e86;
}

body.admin-dark .admin-pagination a,
body.admin-dark .admin-pagination span,
body.admin-dark .pagination-wrap a,
body.admin-dark .pagination-wrap span {
    background: #151f35;
    border-color: #344360;
    color: #dbe4f6;
}

body.admin-dark .admin-pagination a:hover,
body.admin-dark .admin-pagination .active,
body.admin-dark .pagination-wrap .active {
    background: #303fbd;
    border-color: #6b7bff;
    color: #ffffff;
}

body.admin-dark .admin-dark-toggle,
body.admin-dark .theme-button {
    color: var(--admin-text);
}

body.admin-dark .file-dropzone {
    background: #10192c;
    border-color: #465a80;
}

body.admin-dark .file-dropzone:hover,
body.admin-dark .file-dropzone.is-dragover {
    background: #182748;
    border-color: #7185ff;
}

body.admin-dark .admin-form-notice,
body.admin-dark .admin-info-box,
body.admin-dark .admin-settings-notice {
    background: #182a48;
    border-color: #3a5f95;
    color: #c9dcff;
}

/* Editor teks, dropzone, dan komponen upload */
:is(html.theme-dark, body.dark-mode) .rich-editor {
    border-color: #2c3a56;
    background: #151d31;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .16);
}

:is(html.theme-dark, body.dark-mode) .rich-editor-toolbar,
:is(html.theme-dark, body.dark-mode) .rich-editor-footer {
    border-color: #2c3a56;
    background: #18233a;
    color: #aab5ca;
}

:is(html.theme-dark, body.dark-mode) .rich-editor-tool {
    color: #bac7df;
}

:is(html.theme-dark, body.dark-mode) .rich-editor-tool:hover,
:is(html.theme-dark, body.dark-mode) .rich-editor-tool:focus-visible,
:is(html.theme-dark, body.dark-mode) .rich-editor-tool--image {
    border-color: #48619a;
    background: #202f55;
    color: #bcd0ff;
}

:is(html.theme-dark, body.dark-mode) .rich-editor-divider {
    background: #344360;
}

:is(html.theme-dark, body.dark-mode) .rich-editor-surface {
    background: #10192c;
    color: #dbe5f7;
}

:is(html.theme-dark, body.dark-mode) .rich-editor-surface h2,
:is(html.theme-dark, body.dark-mode) .rich-editor-surface h3 {
    color: #f2f6ff;
}

:is(html.theme-dark, body.dark-mode) .rich-editor-surface blockquote {
    background: #202c49;
    color: #c4ccdc;
}

:is(html.theme-dark, body.dark-mode) .rich-editor-surface figure.editor-inline-image img,
:is(html.theme-dark, body.dark-mode) .file-preview-item {
    background: #202a42;
    border-color: #3b4c6d;
}

:is(html.theme-dark, body.dark-mode) .file-dropzone,
:is(html.theme-dark, body.dark-mode) .image-upload-field.has-files .file-dropzone {
    border-color: #465a80;
    background: #17223b;
}

:is(html.theme-dark, body.dark-mode) .file-dropzone:hover,
:is(html.theme-dark, body.dark-mode) .file-dropzone:focus-within {
    border-color: #7185ff;
    background: #202f55;
}

:is(html.theme-dark, body.dark-mode) .file-dropzone-icon {
    background: #1b2b58;
    color: #9db1ff;
}

:is(html.theme-dark, body.dark-mode) .file-dropzone-copy strong {
    color: #e1e9f8;
}

:is(html.theme-dark, body.dark-mode) .file-dropzone-copy small,
:is(html.theme-dark, body.dark-mode) .file-upload-more {
    color: #aab5ca;
}

/* Bagian tambahan yang dipakai oleh halaman artikel dan halaman lama */
:is(html.theme-dark, body.dark-mode) .reader-share-row,
:is(html.theme-dark, body.dark-mode) .reader-share-menu,
:is(html.theme-dark, body.dark-mode) .reader-recommended-card,
:is(html.theme-dark, body.dark-mode) .reader-comment-login,
:is(html.theme-dark, body.dark-mode) .reader-comment-form,
:is(html.theme-dark, body.dark-mode) .reader-sidebar-banner,
:is(html.theme-dark, body.dark-mode) .article-gallery-item figcaption,
:is(html.theme-dark, body.dark-mode) .reader-story-text blockquote,
:is(html.theme-dark, body.dark-mode) .reader-baca-juga,
:is(html.theme-dark, body.dark-mode) .reader-comment-error {
    background: #18233a;
    border-color: #344360;
    color: #dbe5f7;
}

:is(html.theme-dark, body.dark-mode) .article-gallery-item,
:is(html.theme-dark, body.dark-mode) .reader-recommended-image,
:is(html.theme-dark, body.dark-mode) .reader-comment-login > i,
:is(html.theme-dark, body.dark-mode) .reader-side-story > span,
:is(html.theme-dark, body.dark-mode) .reader-side-icon--blue,
:is(html.theme-dark, body.dark-mode) .reader-side-icon--orange,
:is(html.theme-dark, body.dark-mode) .reader-side-icon--purple,
:is(html.theme-dark, body.dark-mode) .reader-side-icon--green {
    background: #202c49;
}

:is(html.theme-dark, body.dark-mode) .reader-share-label,
:is(html.theme-dark, body.dark-mode) .reader-share-menu-item,
:is(html.theme-dark, body.dark-mode) .reader-baca-juga-list a,
:is(html.theme-dark, body.dark-mode) .reader-side-story strong,
:is(html.theme-dark, body.dark-mode) .reader-opinion-list strong,
:is(html.theme-dark, body.dark-mode) .reader-comment-form-head strong,
:is(html.theme-dark, body.dark-mode) .reader-comment-login strong,
:is(html.theme-dark, body.dark-mode) .reader-comment-meta strong,
:is(html.theme-dark, body.dark-mode) .reader-side-heading h2 {
    color: #eef3ff;
}

:is(html.theme-dark, body.dark-mode) .reader-share-intro small,
:is(html.theme-dark, body.dark-mode) .reader-comment-form-head span:not(.reader-author-avatar),
:is(html.theme-dark, body.dark-mode) .reader-comment-login p,
:is(html.theme-dark, body.dark-mode) .reader-comment-form-footer small,
:is(html.theme-dark, body.dark-mode) .reader-comment-meta time,
:is(html.theme-dark, body.dark-mode) .reader-comment-empty,
:is(html.theme-dark, body.dark-mode) .reader-side-story small,
:is(html.theme-dark, body.dark-mode) .reader-opinion-list span,
:is(html.theme-dark, body.dark-mode) .reader-follow-card > p {
    color: #aab5ca;
}

:is(html.theme-dark, body.dark-mode) .reader-comment-login > i,
:is(html.theme-dark, body.dark-mode) .reader-side-icon--blue {
    color: #9db1ff;
}

:is(html.theme-dark, body.dark-mode) .reader-side-icon--orange {
    color: #ffbd58;
}

:is(html.theme-dark, body.dark-mode) .reader-side-icon--purple {
    color: #c5a6ff;
}

:is(html.theme-dark, body.dark-mode) .reader-side-icon--green {
    color: #7ce0b0;
}

:is(html.theme-dark, body.dark-mode) .reader-content-pagination,
:is(html.theme-dark, body.dark-mode) .reader-article-tags,
:is(html.theme-dark, body.dark-mode) .reader-opinion-list a,
:is(html.theme-dark, body.dark-mode) .reader-comment-item,
:is(html.theme-dark, body.dark-mode) .reader-meta-row {
    border-color: #2c3a56;
}

:is(html.theme-dark, body.dark-mode) .reader-pagination-actions > a:hover,
:is(html.theme-dark, body.dark-mode) .reader-side-story > span:not(:first-child) {
    background: #202b56;
    color: #dbe4f6;
}

:is(html.theme-dark, body.dark-mode) .news-shell,
:is(html.theme-dark, body.dark-mode) .live-news-section {
    background: #0b1120;
    color: #eef3ff;
}

:is(html.theme-dark, body.dark-mode) .news-shell-header {
    background: #111a2e;
    border-color: #2c3a56;
    color: #eef3ff;
}

:is(html.theme-dark, body.dark-mode) .news-shell-brand,
:is(html.theme-dark, body.dark-mode) .news-shell-icon {
    color: #eef3ff;
}

:is(html.theme-dark, body.dark-mode) .news-shell-icon {
    background: #1c2841;
    border-color: #3b4c6d;
}

:is(html.theme-dark, body.dark-mode) .news-shell-nav a:hover,
:is(html.theme-dark, body.dark-mode) .news-shell-icon:hover,
:is(html.theme-dark, body.dark-mode) .news-shell-icon.is-enabled {
    background: #202b56;
    border-color: #6578ff;
    color: #ffffff;
}

:is(html.theme-dark, body.dark-mode) .homepage-empty-panel,
:is(html.theme-dark, body.dark-mode) .homepage-empty-state {
    background: #151d31;
    border-color: #344360;
    color: #aab5ca;
}

:is(html.theme-dark, body.dark-mode) .homepage-empty-panel strong,
:is(html.theme-dark, body.dark-mode) .homepage-empty-state strong {
    color: #eef3ff;
}

:is(html.theme-dark, body.dark-mode) .polling-status.is-open {
    background: #15372d;
    color: #91edbd;
}

:is(html.theme-dark, body.dark-mode) .polling-status.is-closed,
:is(html.theme-dark, body.dark-mode) .polling-closed-note {
    background: #45321b;
    color: #ffcf83;
}

/* Admin: fallback menggunakan class pada html sehingga tidak ada kilatan putih
   sebelum admin.js selesai memasang class admin-dark pada body. */
html.theme-dark .admin-app {
    --admin-bg: #0b1120;
    --admin-surface: #151d31;
    --admin-border: #2c3a56;
    --admin-text: #eef3ff;
    --admin-muted: #aab5ca;
    --admin-blue-2: #8fa3ff;
    background: var(--admin-bg);
    color: var(--admin-text);
}

html.theme-dark .admin-app .admin-sidebar {
    background: #080d25;
    border-color: #202b4b;
}

html.theme-dark .admin-app .admin-topbar,
html.theme-dark .admin-app .admin-content,
html.theme-dark .admin-app .admin-workspace,
html.theme-dark .admin-app .panel,
html.theme-dark .admin-app .stat-card,
html.theme-dark .admin-app .admin-module-card,
html.theme-dark .admin-app .admin-settings-panel,
html.theme-dark .admin-app .admin-media-upload-card,
html.theme-dark .admin-app .admin-follow-preview,
html.theme-dark .admin-app .admin-media-library-panel,
html.theme-dark .admin-app .inline-news-panel,
html.theme-dark .admin-app .inline-form-panel {
    background: #151d31;
    border-color: #2c3a56;
    color: #eef3ff;
}

html.theme-dark .admin-app .admin-content,
html.theme-dark .admin-app .admin-workspace {
    background: #0b1120;
}

html.theme-dark .admin-app .admin-search,
html.theme-dark .admin-app .inline-search-field,
html.theme-dark .admin-app input,
html.theme-dark .admin-app textarea,
html.theme-dark .admin-app select,
html.theme-dark .admin-app .admin-poll-card,
html.theme-dark .admin-app .admin-media-card,
html.theme-dark .admin-app .admin-role-list > div,
html.theme-dark .admin-app .banner-slot-item,
html.theme-dark .admin-app .admin-banner-card,
html.theme-dark .admin-app .admin-filter-add-box,
html.theme-dark .admin-app .admin-check-card {
    background: #10192c;
    border-color: #344360;
    color: #eef3ff;
}

html.theme-dark .admin-app .sidebar-link,
html.theme-dark .admin-app .sidebar-label,
html.theme-dark .admin-app .admin-topbar,
html.theme-dark .admin-app h1,
html.theme-dark .admin-app h2,
html.theme-dark .admin-app h3,
html.theme-dark .admin-app h4,
html.theme-dark .admin-app strong,
html.theme-dark .admin-app label {
    color: #eef3ff;
}

html.theme-dark .admin-app p,
html.theme-dark .admin-app small,
html.theme-dark .admin-app .muted-note,
html.theme-dark .admin-app .inline-field-help,
html.theme-dark .admin-app .source-label,
html.theme-dark .admin-app .module-placeholder-copy p {
    color: #aab5ca;
}

html.theme-dark .admin-simple {
    min-height: 100vh;
    background: #0b1120;
    color: #eef3ff;
}

html.theme-dark .admin-simple .admin-simple-header {
    background: #080d25;
    border-color: #202b4b;
    color: #eef3ff;
}

html.theme-dark .admin-simple .admin-simple-card,
html.theme-dark .admin-simple .admin-simple-container,
html.theme-dark .admin-simple .admin-form-main,
html.theme-dark .admin-simple .admin-form-side {
    background: #151d31;
    border-color: #2c3a56;
    color: #eef3ff;
}

html.theme-dark .admin-simple .admin-search-simple input,
html.theme-dark .admin-simple .admin-search-simple select,
html.theme-dark .admin-simple .admin-field input,
html.theme-dark .admin-simple .admin-field select,
html.theme-dark .admin-simple .admin-field textarea {
    background: #10192c;
    border-color: #344360;
    color: #eef3ff;
}

/* Elemen select browser mengikuti latar gelap */
:is(html.theme-dark, body.dark-mode) option,
body.admin-dark option {
    background: #10192c;
    color: #eef3ff;
}

/* Reduced motion tetap dihormati */
@media (prefers-reduced-motion: reduce) {
    :is(html.theme-dark, body.dark-mode) *,
    body.admin-dark * {
        transition: none !important;
    }
}
