/* ==========================================================================
   Dark mode — still mobile-first (no media queries here)
   ========================================================================== */

[data-theme="dark"],
[data-bs-theme="dark"] {
    --md-primary:              #4c9a6e;
    --md-primary-dark:         #3d8059;
    --md-primary-light:        #9cd6a6;
    --md-on-primary:           #0d1117;
    --md-accent:               #e3b341;
    --md-error:                #f85149;

    --md-surface:              #0d1117;
    --md-surface-1:            #161b22;
    --md-surface-2:            #21262d;
    --md-surface-3:            #30363d;
    --md-surface-bright:       #1c2128;

    --md-on-surface:           #e6edf3;
    --md-on-surface-variant:   #8b949e;
    --md-outline:              #484f58;
    --md-outline-variant:      #30363d;

    --status-success-bg:       #1a3a26;
    --status-success-fg:       #9cd6a6;
    --status-warning-bg:       #3a2f10;
    --status-warning-fg:       #e3b341;
    --status-danger-bg:        #3d1a1a;
    --status-danger-fg:        #f85149;
    --status-info-bg:          #0d2a3a;
    --status-info-fg:          #58a6ff;

    --shadow-xs:               0 1px 2px rgba(0,0,0,0.4);
    --shadow-sm:               0 1px 2px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
    --shadow-md:               0 2px 8px rgba(0,0,0,0.4);
    --shadow-lg:               0 8px 24px rgba(0,0,0,0.6);
    --shadow-xl:               0 20px 60px rgba(0,0,0,0.7);
}

[data-theme="dark"] body,
[data-bs-theme="dark"] body { background: var(--md-surface); }

/* Sidebar in dark mode is slightly lighter than the surface behind it */
[data-theme="dark"] .sidebar,
[data-bs-theme="dark"] .sidebar { background: var(--md-surface-1); }

[data-theme="dark"] .btn-ghost:hover,
[data-bs-theme="dark"] .btn-ghost:hover { background: rgba(255,255,255,0.08); }

[data-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:hover { background: rgba(255,255,255,0.06); }

[data-theme="dark"] .dropzone-area,
[data-bs-theme="dark"] .dropzone-area { background: #1a2a1e; border-color: #404943; }
[data-theme="dark"] .dropzone-area:hover,
[data-bs-theme="dark"] .dropzone-area:hover { background: #1f3223; }
[data-theme="dark"] .dropzone-area.dropzone-active,
[data-bs-theme="dark"] .dropzone-area.dropzone-active { background: #244028; }
[data-theme="dark"] .dropzone-preview,
[data-bs-theme="dark"] .dropzone-preview { border-color: var(--md-outline-variant); }

[data-theme="dark"] .app-bar,
[data-bs-theme="dark"] .app-bar {
    background: color-mix(in srgb, var(--md-surface) 88%, transparent);
}

[data-theme="dark"] .notif-dot,
[data-bs-theme="dark"] .notif-dot { box-shadow: 0 0 0 2px var(--md-surface); }