/* Components keep their original light palette as fallbacks. Only resolved dark mode supplies these tokens. */
html[data-theme=dark]{--bg:#101525;--card:#1b2235;--ink:#eef1ff;--muted:#b3bdd3;--line:#3a4560;--shadow:0 12px 35px #0005;--m5-deep:#eef1ff;--m5-green:#49d38b;--m5-purple:#b09aff;--m5-soft-purple:#2b2449;--m5-soft-green:#173b30;--m5-surface:#1b2235;--m5-surface-purple:#28213f;--m5-surface-green:#16362c;--m5-surface-blue:#1c2c47;--m5-foreground:#eef1ff;--m5-foreground-muted:#b5bfd8;--m5-border:#3a4560;--m5-ad-bg:#101525;--m5-ad-card:#1b2235;--m5-ad-text:#eef1ff;color-scheme:dark;background:#101525}
html[data-theme=dark] body{background:#101525!important;color:#eef1ff!important}html[data-theme=dark] :is(input,textarea,select){background-color:#121a2c!important;color:#eef1ff!important;border-color:#46536f!important}html[data-theme=dark] ::placeholder{color:#aab5ce!important;opacity:1}html[data-theme=dark] dialog{background:#1b2235;color:#eef1ff;border-color:#46536f}html[data-theme=dark] dialog::backdrop{background:#000b}html[data-theme=dark] :is(.modal-content,.m5-settings-modal,.m5-settings-card,.m5-co-dialog-body,.m5-op-dialog,.m5-admin-dossier){background:#1b2235!important;color:#eef1ff!important}html[data-theme=dark] :is(h1,h2,h3,h4,label,legend){color:var(--m5-foreground)}html[data-theme=dark] :is(.m5-ad-card,.m5-ad-sidebar,.m5-ad-topbar,.m5-co-panel,.m5-co-post,.m5-co-user-card){border-color:#3a4560!important}html[data-theme=dark] :is(.notice,.m5-ad-notice){background:#252445!important;color:#e3deff!important}html[data-theme=dark] :is([style*="background:#fff"],[style*="background: #fff"],[style*="background-color:#fff"]){background:#1b2235!important}html[data-theme=dark] .m5-ad-chart text{fill:#c0c9df}html[data-theme=dark] a{color:#b9abff}html[data-theme=dark] :focus-visible{outline:3px solid #b9abff;outline-offset:3px}

html[data-theme=dark] header{background:#1b2235!important;border-color:#3a4560!important}html[data-theme=dark] :is(.card,.searchbox,.mission,.conversation,.chat-panel,.chat-header,.chat-form,.m5-profile-card,.m5-co-topbar){background-color:#1b2235!important;color:#eef1ff}html[data-theme=dark] nav button{color:#c9c8eb}html[data-theme=dark] nav button.active{background:#332653;color:#d3c4ff}html[data-theme=dark] :is(.btn-soft,.btn-light){background:#30264c;color:#ddd0ff}html[data-theme=dark] .modal{background:#000a}html[data-theme=dark] .modal-box{background:#1b2235;color:#eef1ff}html[data-theme=dark] :is(.m5-ad-topbar,.m5-co-topbar,.m5-messages-toolbar){background:#1b2235!important}

html[data-theme=dark]{--m5-surface-rgb:27,34,53}html[data-theme=dark] :is(#community,.m5-co-dialog){--co-ink:#eef1ff;--co-muted:#b5bfd8;--co-line:#3a4560}html[data-theme=dark] #home .m5-hero-intro h1 span{background-image:linear-gradient(95deg,#b89aff 0%,#b89aff 42%,#4bdf93 85%)}
html[data-theme=dark] :is(.panel,.stat-card,.empty,.form-card,.profile-side,.profile-main,.chat,.message-list,.notif-card,.workflow,.proposal,.filter,.icon-btn,.delete-confirm){background-color:#1b2235!important;color:#eef1ff;border-color:#3a4560}html[data-theme=dark] :is(.badge,.status-badge,.meta){color:#c5d2ed}html[data-theme=dark] .status-pending{background:#44351c}html[data-theme=dark] .status-accepted{background:#30264c}html[data-theme=dark] .status-paid{background:#173b30}html[data-theme=dark] .status-rejected{background:#492331}
