﻿/* =========================================================
   MPE — DARK THEME (رنگ‌ها)
   Version 5.0
   ========================================================= */

/* ═══ VARIABLES ═══ */
body.mpe-dark {
    --mpe-bg: #0f0a1c;
    --mpe-surface: #1e1233;
    --mpe-surface-2: #251740;
    --mpe-surface-3: #2d1b4e;
    --mpe-text: #e8e3f0;
    --mpe-text-muted: #9b8db3;
    --mpe-heading: #f0ece2;
    --mpe-border: rgba(245, 200, 66, 0.15);
    --mpe-gold: #c9a227;
    --mpe-gold-light: #f5c842;
    --mpe-purple: #4b2a73;
    --mpe-purple-dark: #1a0f2e;
    --mpe-success: #10b981;
    --mpe-danger: #dc2626;
    --mpe-warning: #f59e0b;
    --mpe-info: #3b82f6;
    background: var(--mpe-bg);
    color: var(--mpe-text);
}

    /* ═══ TEXT ═══ */
    body.mpe-dark h1, body.mpe-dark h2, body.mpe-dark h3,
    body.mpe-dark h4, body.mpe-dark h5, body.mpe-dark h6 {
        color: var(--mpe-heading);
    }

    body.mpe-dark p, body.mpe-dark span, body.mpe-dark li, body.mpe-dark label {
        color: inherit;
    }

    body.mpe-dark a:not(.btn):not(.nav-link):not(.dropdown-item):not(.mpe-floating-cta):not(.ac-sub-link) {
        color: var(--mpe-gold);
    }

        body.mpe-dark a:not(.btn):not(.nav-link):not(.dropdown-item):not(.mpe-floating-cta):not(.ac-sub-link):hover {
            color: var(--mpe-gold-light);
        }

    body.mpe-dark main,
    body.mpe-dark .mpe-page,
    body.mpe-dark .site-main {
        background: var(--mpe-bg) !important;
    }

    body.mpe-dark .text-muted,
    body.mpe-dark small,
    body.mpe-dark .mpe-muted,
    body.mpe-dark .mpe-meta,
    body.mpe-dark .mpe-help,
    body.mpe-dark .mpe-table-meta {
        color: var(--mpe-text-muted) !important;
    }

    body.mpe-dark .mpe-section-title {
        color: var(--mpe-gold-light) !important;
    }

    body.mpe-dark .mpe-eyebrow {
        color: #c4b8d9 !important;
    }

    /* ═══ HEADER ═══ */
    body.mpe-dark header {
        background: #1a0f2e !important;
        border-bottom: 1px solid rgba(245, 200, 66, 0.1) !important;
    }

    body.mpe-dark .mpe-header-logo {
        background: #1a0f2e !important;
        border: 3px solid var(--mpe-gold) !important;
        box-shadow: 0 0 0 4px rgba(245, 200, 66, 0.2), 0 8px 24px rgba(245, 200, 66, 0.4) !important;
    }

    body.mpe-dark .mpe-header-title__line1 {
        color: #f5c842 !important;
        -webkit-text-fill-color: #f5c842 !important;
    }

    body.mpe-dark .mpe-header-title__line2 {
        color: #c4b8d9 !important;
    }

    /* ═══ NAVBAR ═══ */
    body.mpe-dark .mpe-navbar,
    body.mpe-dark .site-navbar {
        background: linear-gradient(135deg, #2d1b4e 0%, #1a0f2e 100%) !important;
        border-bottom: 2px solid var(--mpe-gold) !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
    }

        body.mpe-dark .mpe-navbar .nav-link,
        body.mpe-dark .site-navbar .nav-link {
            color: var(--mpe-text) !important;
            font-weight: 600;
        }

            body.mpe-dark .mpe-navbar .nav-link:hover,
            body.mpe-dark .mpe-navbar .nav-link:focus,
            body.mpe-dark .site-navbar .nav-link:hover {
                color: var(--mpe-gold-light) !important;
                background: rgba(245, 200, 66, 0.08) !important;
            }

            body.mpe-dark .mpe-navbar .nav-link.active,
            body.mpe-dark .site-navbar .nav-link.active {
                color: var(--mpe-gold-light) !important;
                border-bottom: 3px solid var(--mpe-gold);
            }

        body.mpe-dark .mpe-navbar .dropdown-menu,
        body.mpe-dark .site-navbar .dropdown-menu {
            background: var(--mpe-surface) !important;
            border: 1px solid var(--mpe-border) !important;
            border-top: 3px solid var(--mpe-gold) !important;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
        }

        body.mpe-dark .mpe-navbar .dropdown-item,
        body.mpe-dark .site-navbar .dropdown-item {
            color: var(--mpe-text) !important;
        }

            body.mpe-dark .mpe-navbar .dropdown-item:hover,
            body.mpe-dark .site-navbar .dropdown-item:hover {
                background: rgba(245, 200, 66, 0.1) !important;
                color: var(--mpe-gold-light) !important;
            }

        body.mpe-dark .mpe-navbar .navbar-toggler {
            background: linear-gradient(135deg, #f5c842, #c9a227) !important;
            border-color: var(--mpe-gold-light) !important;
            color: #1a0f2e !important;
            box-shadow: 0 2px 12px rgba(245, 200, 66, 0.4) !important;
        }

    /* ═══ FOOTER ═══ */
    body.mpe-dark .mpe-footer,
    body.mpe-dark .site-footer {
        background: #0a0518 !important;
        color: #b8a8d0 !important;
        border-top: 3px solid var(--mpe-gold) !important;
    }

        body.mpe-dark .mpe-footer a,
        body.mpe-dark .site-footer a {
            color: var(--mpe-gold) !important;
        }

    /* ═══ CARDS ═══ */
    body.mpe-dark .card,
    body.mpe-dark .mpe-card,
    body.mpe-dark .mpe-content-card,
    body.mpe-dark .calc-card,
    body.mpe-dark .chart-box,
    body.mpe-dark .testimonial-card,
    body.mpe-dark .mpe-form-section,
    body.mpe-dark .mpe-toolbar,
    body.mpe-dark .step-card,
    body.mpe-dark .compare-card,
    body.mpe-dark .article-card,
    body.mpe-dark .faq-item {
        background: var(--mpe-surface) !important;
        border: 1px solid var(--mpe-border) !important;
        color: var(--mpe-text) !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    }

    body.mpe-dark .card-body,
    body.mpe-dark .card-header,
    body.mpe-dark .card-footer,
    body.mpe-dark .mpe-card-body,
    body.mpe-dark .mpe-card-header {
        background: transparent !important;
        color: var(--mpe-text) !important;
        border-color: var(--mpe-border) !important;
    }

    body.mpe-dark .mpe-card-header,
    body.mpe-dark .card-header {
        color: var(--mpe-gold-light) !important;
        font-weight: 700;
    }

    body.mpe-dark .card h1, body.mpe-dark .card h2,
    body.mpe-dark .card h3, body.mpe-dark .card h4,
    body.mpe-dark .card h5, body.mpe-dark .card h6 {
        color: var(--mpe-heading) !important;
    }

    /* ═══ FORMS ═══ */
    body.mpe-dark input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="file"]):not([type="hidden"]):not([type="image"]),
    body.mpe-dark select,
    body.mpe-dark textarea,
    body.mpe-dark .form-control,
    body.mpe-dark .form-select {
        background-color: var(--mpe-surface) !important;
        border: 1.5px solid rgba(245, 200, 66, 0.25) !important;
        color: var(--mpe-text) !important;
    }

        body.mpe-dark input:focus:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
        body.mpe-dark select:focus,
        body.mpe-dark textarea:focus,
        body.mpe-dark .form-control:focus,
        body.mpe-dark .form-select:focus {
            background-color: var(--mpe-surface-2) !important;
            border-color: var(--mpe-gold) !important;
            color: #fff !important;
            box-shadow: 0 0 0 0.2rem rgba(201, 162, 39, 0.15) !important;
        }

        body.mpe-dark input::placeholder,
        body.mpe-dark textarea::placeholder,
        body.mpe-dark .form-control::placeholder {
            color: #8b7aa8 !important;
        }

    body.mpe-dark .form-label,
    body.mpe-dark .form-floating > label,
    body.mpe-dark .form-text,
    body.mpe-dark label {
        color: #c4b8d9 !important;
        font-weight: 600;
    }

    body.mpe-dark .input-group-text {
        background: var(--mpe-surface) !important;
        border-color: var(--mpe-border) !important;
        color: #c4b8d9 !important;
    }

    body.mpe-dark input[type="checkbox"],
    body.mpe-dark input[type="radio"] {
        accent-color: var(--mpe-gold);
    }

    body.mpe-dark .form-check-input {
        background-color: var(--mpe-surface-2);
        border-color: var(--mpe-border);
    }

        body.mpe-dark .form-check-input:checked {
            background-color: var(--mpe-gold);
            border-color: var(--mpe-gold);
        }

    body.mpe-dark .form-check-label {
        color: var(--mpe-text) !important;
    }

    /* ═══ BUTTONS ═══ */
    body.mpe-dark .btn-primary {
        background-color: var(--mpe-gold) !important;
        border-color: var(--mpe-gold) !important;
        color: #1a0f2e !important;
    }

        body.mpe-dark .btn-primary:hover,
        body.mpe-dark .btn-primary:focus {
            background-color: var(--mpe-gold-light) !important;
            border-color: var(--mpe-gold-light) !important;
            color: #1a0f2e !important;
        }

    body.mpe-dark .btn-outline-primary {
        color: var(--mpe-gold) !important;
        border-color: var(--mpe-gold) !important;
    }

    body.mpe-dark .btn-outline-secondary {
        color: #c4b8d9 !important;
        border-color: rgba(245, 200, 66, 0.3) !important;
    }

    body.mpe-dark .btn-outline-info {
        color: #93c5fd !important;
        border-color: rgba(59, 130, 246, 0.5) !important;
    }

    body.mpe-dark .btn-outline-danger {
        color: #fca5a5 !important;
        border-color: rgba(220, 38, 38, 0.5) !important;
    }

    body.mpe-dark .btn-success {
        background: #10b981 !important;
        border-color: #10b981 !important;
        color: #fff !important;
    }

    body.mpe-dark .btn-warning {
        background: var(--mpe-gold) !important;
        border-color: var(--mpe-gold) !important;
        color: #1a0f2e !important;
    }

    /* ═══ TABLES ═══ */
    body.mpe-dark .table,
    body.mpe-dark table {
        background: transparent !important;
        color: var(--mpe-text) !important;
        border-color: var(--mpe-border) !important;
    }

        body.mpe-dark .table thead th,
        body.mpe-dark table th {
            background: linear-gradient(135deg, #4b2a73, #2d1b4e) !important;
            color: var(--mpe-gold-light) !important;
            border-color: var(--mpe-border) !important;
            font-weight: 700;
        }

        body.mpe-dark .table tbody td,
        body.mpe-dark table td {
            color: var(--mpe-text) !important;
            border-color: rgba(245, 200, 66, 0.1) !important;
        }

        body.mpe-dark .table tbody tr:hover,
        body.mpe-dark table tr:hover {
            background: rgba(245, 200, 66, 0.05) !important;
        }

    body.mpe-dark .table-success {
        background-color: rgba(16, 185, 129, 0.12) !important;
    }

        body.mpe-dark .table-success > * {
            color: #6ee7b7 !important;
        }

    body.mpe-dark .table-warning {
        background-color: rgba(245, 158, 11, 0.12) !important;
    }

        body.mpe-dark .table-warning > * {
            color: #fcd34d !important;
        }

    /* ═══ MODAL ═══ */
    body.mpe-dark .modal-content {
        background: var(--mpe-surface) !important;
        color: var(--mpe-text) !important;
        border: 1px solid var(--mpe-border) !important;
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6) !important;
    }

    body.mpe-dark .modal-header {
        background: linear-gradient(135deg, #2d1b4e, #1e1233) !important;
        border-color: var(--mpe-border) !important;
    }

    body.mpe-dark .modal-footer {
        border-color: var(--mpe-border) !important;
    }

    body.mpe-dark .modal-body {
        color: var(--mpe-text);
    }

    body.mpe-dark .modal-title,
    body.mpe-dark .mpe-modal-title {
        color: var(--mpe-gold-light) !important;
        font-weight: 700;
    }

    body.mpe-dark .btn-close {
        filter: invert(1);
    }

    /* ═══ ALERTS ═══ */
    body.mpe-dark .alert-info {
        background: rgba(59, 130, 246, 0.1);
        border-color: rgba(59, 130, 246, 0.3);
        color: #93c5fd;
    }

    body.mpe-dark .alert-success {
        background: rgba(16, 185, 129, 0.1);
        border-color: rgba(16, 185, 129, 0.3);
        color: #6ee7b7;
    }

    body.mpe-dark .alert-warning {
        background: rgba(245, 158, 11, 0.1);
        border-color: rgba(245, 158, 11, 0.3);
        color: #fcd34d;
    }

    body.mpe-dark .alert-danger {
        background: rgba(220, 38, 38, 0.1);
        border-color: rgba(220, 38, 38, 0.3);
        color: #fca5a5;
    }

    /* ═══ SELECT2 ═══ */
    body.mpe-dark .select2-container--default .select2-selection--single,
    body.mpe-dark .select2-container--default .select2-selection--multiple {
        background: var(--mpe-surface) !important;
        border: 1.5px solid rgba(245, 200, 66, 0.2) !important;
        color: var(--mpe-text) !important;
    }

    body.mpe-dark .select2-dropdown {
        background: var(--mpe-surface) !important;
        border: 1px solid rgba(245, 200, 66, 0.2) !important;
    }

    body.mpe-dark .select2-container--default .select2-results__option {
        color: var(--mpe-text);
    }

    body.mpe-dark .select2-container--default .select2-results__option--highlighted {
        background: var(--mpe-gold) !important;
        color: #1a0f2e !important;
    }

    /* ═══ PAGINATION ═══ */
    body.mpe-dark .pagination .page-link {
        background: var(--mpe-surface);
        border-color: var(--mpe-border);
        color: var(--mpe-gold);
    }

    body.mpe-dark .pagination .page-item.active .page-link {
        background: var(--mpe-gold);
        border-color: var(--mpe-gold);
        color: #1a0f2e;
    }

    /* ═══ FLOATING CTA & SCROLL TOP ═══ */
    body.mpe-dark .mpe-floating-cta {
        background: linear-gradient(135deg, #ffd95a 0%, #f5c842 50%, #e6b800 100%) !important;
        border: 2px solid rgba(255, 230, 130, 0.8) !important;
        color: #1a0f2e !important;
        box-shadow: 0 0 0 3px rgba(245, 200, 66, 0.5), 0 12px 36px rgba(245, 200, 66, 0.7) !important;
    }

    body.mpe-dark .mpe-scroll-top {
        background: linear-gradient(135deg, #4b2a73, #2d1b4e);
        color: var(--mpe-gold-light);
        border: 2px solid rgba(245, 200, 66, 0.3);
    }

    /* ═══ THEME SWITCHER MENU ═══ */
    body.mpe-dark .theme-switcher-menu {
        background: var(--mpe-surface);
        border-color: var(--mpe-border);
    }

    body.mpe-dark .theme-switcher-item {
        color: var(--mpe-text) !important;
    }

        body.mpe-dark .theme-switcher-item:hover {
            background: rgba(245, 200, 66, 0.1);
            color: var(--mpe-gold-light) !important;
        }

    /* ═══ SCROLLBAR ═══ */
    body.mpe-dark::-webkit-scrollbar {
        width: 10px;
    }

    body.mpe-dark::-webkit-scrollbar-track {
        background: var(--mpe-bg);
    }

    body.mpe-dark::-webkit-scrollbar-thumb {
        background: linear-gradient(180deg, #4b2a73, #c9a227);
        border-radius: 10px;
    }

    /* ═══ NUCLEAR — سفیدهای hardcoded ═══ */
    body.mpe-dark [style*="background: white"],
    body.mpe-dark [style*="background:white"],
    body.mpe-dark [style*="background-color: white"],
    body.mpe-dark [style*="background-color:white"],
    body.mpe-dark [style*="background: #fff"],
    body.mpe-dark [style*="background-color: #fff"],
    body.mpe-dark [style*="background: #ffffff"],
    body.mpe-dark [style*="background-color: #ffffff"] {
        background: var(--mpe-surface) !important;
        color: var(--mpe-text) !important;
    }

    body.mpe-dark .bg-white,
    body.mpe-dark .bg-light,
    body.mpe-dark .bg-body,
    body.mpe-dark .bg-body-tertiary {
        background-color: var(--mpe-surface) !important;
        color: var(--mpe-text) !important;
    }

    body.mpe-dark hr,
    body.mpe-dark .divider {
        border-color: var(--mpe-border) !important;
        background: var(--mpe-border) !important;
    }

    /* ═══ PAGE-SPECIFIC OVERRIDES ═══ */
    body.mpe-dark .ac-page {
        background: var(--mpe-bg) !important;
        color: var(--mpe-text);
    }

    body.mpe-dark .ac-hero {
        background: linear-gradient(135deg, #2d1b4e 0%, #3d2761 55%, #4b2a73 100%) !important;
        border: 1px solid rgba(245, 200, 66, 0.15) !important;
    }

    body.mpe-dark .ac-hero-title {
        color: #fff !important;
    }

    body.mpe-dark .ac-hero-lead {
        color: rgba(255, 255, 255, 0.8) !important;
    }

    body.mpe-dark .ac-category {
        background: var(--mpe-surface) !important;
        border-color: var(--mpe-border) !important;
    }

    body.mpe-dark .ac-cat-title {
        color: var(--mpe-gold-light) !important;
    }

    body.mpe-dark .ac-cat-sub {
        color: #c4b8d9 !important;
    }

    body.mpe-dark .ac-cat-count {
        background: rgba(245, 200, 66, 0.12) !important;
        color: var(--mpe-gold-light) !important;
    }

    body.mpe-dark .ac-sub-link {
        background: var(--mpe-surface-2) !important;
        color: var(--mpe-gold) !important;
        border-color: var(--mpe-border) !important;
    }

        body.mpe-dark .ac-sub-link:hover {
            color: #1a0f2e !important;
        }

    body.mpe-dark .ac-empty {
        background: var(--mpe-surface) !important;
        border-color: var(--mpe-border) !important;
    }

        body.mpe-dark .ac-empty h5 {
            color: var(--mpe-gold-light) !important;
        }

        body.mpe-dark .ac-empty p {
            color: #c4b8d9 !important;
        }

    body.mpe-dark .cpi-badge {
        background: linear-gradient(135deg, #4b2a73 0%, #2d1b4e 100%) !important;
        color: #fff !important;
    }

    body.mpe-dark .result-header {
        background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
        color: #fff !important;
    }

    body.mpe-dark .result-table td:first-child {
        color: var(--mpe-text-muted) !important;
    }

    body.mpe-dark .result-table td:last-child {
        color: var(--mpe-heading) !important;
    }

    body.mpe-dark .result-total {
        background: rgba(16, 185, 129, 0.12) !important;
    }

    body.mpe-dark .result-penalty {
        background: rgba(245, 158, 11, 0.1) !important;
    }

    body.mpe-dark .faq-q {
        background: var(--mpe-surface-2) !important;
        color: var(--mpe-heading) !important;
    }

    body.mpe-dark .faq-a {
        background: var(--mpe-surface) !important;
        color: #c4b8d9 !important;
    }

    body.mpe-dark .page-hero {
        background: linear-gradient(135deg, #1a0f2e 0%, #2d1b4e 50%, #1a0f2e 100%) !important;
    }

        body.mpe-dark .page-hero h1 {
            color: #fff !important;
        }

    body.mpe-dark .step-card {
        background: var(--mpe-surface) !important;
        border-color: var(--mpe-border) !important;
    }

        body.mpe-dark .step-card h3 {
            color: var(--mpe-heading) !important;
        }

        body.mpe-dark .step-card p {
            color: #c4b8d9 !important;
        }

    body.mpe-dark .compare-card {
        background: var(--mpe-surface) !important;
        border-color: var(--mpe-border) !important;
    }

    body.mpe-dark .cta-card {
        background: linear-gradient(135deg, #2d1b4e, #1a0f2e) !important;
        border: 1px solid rgba(245, 200, 66, 0.2) !important;
    }

        body.mpe-dark .cta-card h2 {
            color: var(--mpe-gold-light) !important;
        }

    body.mpe-dark .btn-purple {
        background: linear-gradient(135deg, #c9a227 0%, #f5c842 100%) !important;
        border: none !important;
        color: #1a0f2e !important;
    }

    body.mpe-dark .btn-outline-purple {
        border: 1.5px solid var(--mpe-gold) !important;
        color: var(--mpe-gold) !important;
    }

    body.mpe-dark .permission-group {
        background: var(--mpe-surface-2) !important;
        border-color: var(--mpe-border) !important;
    }

        body.mpe-dark .permission-group h6 {
            color: var(--mpe-gold-light) !important;
        }

    body.mpe-dark .info-label {
        color: var(--mpe-text-muted) !important;
    }

    body.mpe-dark .info-value {
        background: var(--mpe-surface-2) !important;
        border-color: var(--mpe-border) !important;
        color: var(--mpe-text) !important;
    }
