/* =====================================================================
   MIRACLE EVENT MARKETPLACE — DARK MODE
   Activated by html[data-theme="dark"] (set by Miracle App Shell;
   the Settings Pro toggle writes the shared msn_dark_mode user meta).

   The html[data-theme="dark"] prefix outranks the plugin's inline
   <style> blocks on specificity, so this one file themes every page.

   Palette (platform standard):
     bg #18191a · card #242526 · elevated #3a3b3c · border #3e4042
     text #e4e6eb · muted #b0b3b8 · pill #1e2a3a · link #93c5fd
   ===================================================================== */

/* ── Shared notices ── */
html[data-theme="dark"] .mem-notice,
html[data-theme="dark"] .mem-notice--error,
html[data-theme="dark"] .mem-notice--warn {
    background: #242526;
    color: #e4e6eb;
    border-color: #3e4042;
}

/* =====================================================================
   ① EVENT CREATE FORM  (#mem-create-root — var-driven)
   ===================================================================== */
html[data-theme="dark"] #mem-create-root {
    --dark:    #e4e6eb;   /* text */
    --gray:    #b0b3b8;   /* muted */
    --border:  #3e4042;
    --surface: #2c2d2f;   /* inputs / panels */
    --white:   #242526;   /* cards */
    --shadow:  0 12px 40px rgba(0,0,0,.45);
}

/* Hardcoded light hovers / accents inside the form */
html[data-theme="dark"] #mem-create-root .mem-file-zone:hover,
html[data-theme="dark"] #mem-create-root .mem-file-zone.has-file,
html[data-theme="dark"] #mem-create-root .mem-add-ticket-btn:hover,
html[data-theme="dark"] #mem-create-root .mem-token-option:hover {
    background: #1e2a3a;
}
html[data-theme="dark"] #mem-create-root .mem-token-option.selected {
    background: #1e2a3a;
    color: #93c5fd;
}
html[data-theme="dark"] #mem-create-root .mem-notice--error {
    background: #450a0a; color: #fca5a5;
}
html[data-theme="dark"] #mem-create-root .mem-notice--warn {
    background: #3f2e08; color: #fde68a;
}
html[data-theme="dark"] #mem-create-root .mem-notice--success {
    background: #052e1b; color: #6ee7b7;
}
html[data-theme="dark"] #mem-create-root .mem-remove-ticket {
    background: #450a0a;
}
html[data-theme="dark"] #mem-create-root .mem-remove-ticket:hover {
    background: #7f1d1d;
}

/* =====================================================================
   ② SINGLE EVENT PAGE  (the_content render — .mem-single)
   ===================================================================== */
html[data-theme="dark"] .mem-single { color: #e4e6eb; }
html[data-theme="dark"] .mem-single .mem-meta { color: #b0b3b8; }
html[data-theme="dark"] .mem-single .mem-box {
    background: #242526;
    box-shadow: 0 10px 28px rgba(0,0,0,.4);
}
html[data-theme="dark"] .mem-single .mem-ticket { border-color: #3e4042; }
html[data-theme="dark"] .mem-modal-box {
    background: #242526;
    color: #e4e6eb;
}
html[data-theme="dark"] .mem-cancel { color: #b0b3b8; }

/* =====================================================================
   ③ TICKET SUCCESS PAGE  (.mem-ticket-success)
   ===================================================================== */
html[data-theme="dark"] .mem-ticket-success {
    background: #0c2230;
    border-color: #155e75;
    color: #e4e6eb;
}
html[data-theme="dark"] .mem-ticket-success h2 { color: #67e8f9; }

/* =====================================================================
   ④ TICKET WALLET PAGE  (.mem-ticket-wallet)
   The euro-note ticket itself stays gold by design (printed-note look).
   ===================================================================== */
html[data-theme="dark"] .mem-ticket-wallet,
html[data-theme="dark"] .mem-ticket-wallet h2 { color: #e4e6eb; }
html[data-theme="dark"] { --mem-page: #18191a; } /* ticket perforation notches */

/* =====================================================================
   ⑤ ORGANIZER EARNINGS DASHBOARD  (.mem-org-earnings-wrap)
   ===================================================================== */
html[data-theme="dark"] .mem-org-earnings-wrap { color: #e4e6eb; }
html[data-theme="dark"] .mem-org-earnings-wrap .mem-card {
    background: #242526;
    box-shadow: 0 8px 22px rgba(0,0,0,.4);
}
html[data-theme="dark"] .mem-earnings-table {
    background: #242526;
    color: #e4e6eb;
    box-shadow: 0 10px 28px rgba(0,0,0,.4);
}
html[data-theme="dark"] .mem-earnings-table th { background: #2c2d2f; }
html[data-theme="dark"] .mem-earnings-table th,
html[data-theme="dark"] .mem-earnings-table td { border-bottom-color: #3e4042; }
html[data-theme="dark"] .mem-org-earnings-wrap .mem-green { color: #34d399; }
html[data-theme="dark"] .mem-org-earnings-wrap .mem-orange { color: #fbbf24; }
html[data-theme="dark"] .mem-org-earnings-wrap .mem-red { color: #f87171; }
html[data-theme="dark"] .mem-muted { color: #b0b3b8; }

/* =====================================================================
   ⑥ ORGANIZER REFUND DASHBOARD  (.mem-org-refund-wrap)
   ===================================================================== */
html[data-theme="dark"] .mem-org-refund-wrap { color: #e4e6eb; }
html[data-theme="dark"] .mem-org-refund-block {
    background: #242526;
    box-shadow: 0 10px 28px rgba(0,0,0,.4);
}
html[data-theme="dark"] .mem-org-refund-table th { background: #2c2d2f; }
html[data-theme="dark"] .mem-org-refund-table th,
html[data-theme="dark"] .mem-org-refund-table td { border-bottom-color: #3e4042; }
html[data-theme="dark"] .mem-badge.mem-unused   { background: #064e3b; color: #6ee7b7; }
html[data-theme="dark"] .mem-badge.mem-used     { background: #431407; color: #fdba74; }
html[data-theme="dark"] .mem-badge.mem-refunded { background: #1e2a3a; color: #cbd5e1; }

/* =====================================================================
   ⑦ ORGANIZER SCAN UI  (.mem-scan-box)
   ===================================================================== */
html[data-theme="dark"] .mem-scan-box {
    background: #242526;
    color: #e4e6eb;
    box-shadow: 0 12px 30px rgba(0,0,0,.45);
}
html[data-theme="dark"] #mem-scan-input {
    background: #2c2d2f;
    border-color: #3e4042;
    color: #e4e6eb;
}

/* =====================================================================
   ⑧ GENERIC FALLBACKS shared across dashboards
   ===================================================================== */
html[data-theme="dark"] .mem-back-to-events {
    background: #1e2a3a;
    color: #93c5fd;
}
html[data-theme="dark"] .mem-organizer-dashboard,
html[data-theme="dark"] .mem-entry-dashboard,
html[data-theme="dark"] .mem-sd-wrap,
html[data-theme="dark"] .mem-wallet-wrap,
html[data-theme="dark"] .mem-th-wrap { color: #e4e6eb; }
