/* Dark mode contrast for legacy light-theme command cards; light mode unchanged. */
html[data-mf-theme="dark"] #app .layout {
 --contrast-title:#f2f7fd; --contrast-body:#dce9f4; --contrast-muted:#bdd0e0;
 --contrast-gold:#edc68b; --contrast-blue:#a4d8fa;
}
html[data-mf-theme="dark"] #app .layout .v2-cmd-card {
 background:#112b42!important;color:var(--contrast-body)!important;border-color:#3a5b73!important;
}
html[data-mf-theme="dark"] #app .layout .v2-cmd-head h3,
html[data-mf-theme="dark"] #app .layout .v2-cmd-hbar>span b,
html[data-mf-theme="dark"] #app .layout .v2-cmd-age>div>b,
html[data-mf-theme="dark"] #app .layout .v2-cmd-number b,
html[data-mf-theme="dark"] #app .layout .v2-cmd-stages em,
html[data-mf-theme="dark"] #app .layout .v2-cmd-scenario b,
html[data-mf-theme="dark"] #app .layout .v2-cmd-actions>button strong,
html[data-mf-theme="dark"] #app .layout .v2-cmd-ready b {
 color:var(--contrast-title)!important;
}
html[data-mf-theme="dark"] #app .layout .v2-cmd-head p,
html[data-mf-theme="dark"] #app .layout .v2-cmd-hbar>span small,
html[data-mf-theme="dark"] #app .layout .v2-cmd-age>div>span,
html[data-mf-theme="dark"] #app .layout .v2-cmd-stages>div>span,
html[data-mf-theme="dark"] #app .layout .v2-cmd-number span,
html[data-mf-theme="dark"] #app .layout .v2-cmd-scenario :is(span,small),
html[data-mf-theme="dark"] #app .layout .v2-cmd-ready span {
 color:var(--contrast-muted)!important;
}
html[data-mf-theme="dark"] #app .layout .v2-cmd-head small,
html[data-mf-theme="dark"] #app .layout .v2-cmd-actions>button>span:first-child b,
html[data-mf-theme="dark"] #app .layout .v2-cmd-actions em{
 color:var(--contrast-gold)!important;
}
html[data-mf-theme="dark"] #app .layout .v2-cmd-hbar {color:var(--contrast-body)!important}
html[data-mf-theme="dark"] #app .layout .v2-cmd-hbar>strong{color:var(--contrast-blue)!important}
html[data-mf-theme="dark"] #app .layout .v2-cmd-hbar>i{background:#284c66!important}
html[data-mf-theme="dark"] #app .layout .v2-cmd-hbar>i em{
 background:linear-gradient(90deg,#3b96cb,#91d3ef)!important
}
html[data-mf-theme="dark"] #app .layout .stat .label,
html[data-mf-theme="dark"] #app .layout .stat .note{
 color:var(--contrast-muted)!important
}
html[data-mf-theme="dark"] #app .layout .stat .value{color:var(--contrast-title)!important}
html[data-mf-theme="dark"] #app .layout .v2-cmd-kpis .stat:nth-child(2) .value{
 color:#ffabab!important
}
html[data-mf-theme="dark"] #app .layout .v2-cmd-kpis .stat:nth-child(4) .value,
html[data-mf-theme="dark"] #app .layout .v2-cmd-kpis .stat:nth-child(5) .value{
 color:var(--contrast-gold)!important
}
html[data-mf-theme="dark"] #app .layout .v2-cmd-heat>div{
 background:#193a53!important;border-color:#48647b!important
}
html[data-mf-theme="dark"] #app .layout .v2-cmd-heat>div.warm{background:#493a2b!important}
html[data-mf-theme="dark"] #app .layout .v2-cmd-heat>div.hot{background:#482f3b!important}
html[data-mf-theme="dark"] #app .layout .v2-cmd-heat>div :is(b,small,span){
 color:var(--contrast-body)!important
}
html[data-mf-theme="dark"] #app .layout .v2-cmd-actions>button{
 color:var(--contrast-body)!important
}
html[data-mf-theme="dark"] #app .layout .v2-cmd-line{color:#87c7eb!important}
html[data-mf-theme="dark"] #app .layout .v2-cmd-line>div{
 color:var(--contrast-muted)!important
}
html[data-mf-theme="dark"] #app .layout .v2-cmd-donut:after{background:#112b42!important}
html[data-mf-theme="dark"] #app .layout .v2-equipment-description b,
html[data-mf-theme="dark"] #app .layout .v2-row b,
html[data-mf-theme="dark"] #app .layout .panel h3,
html[data-mf-theme="dark"] #app .layout .panel h4{color:var(--contrast-title)!important}
html[data-mf-theme="dark"] #app .layout .v2-row small,
html[data-mf-theme="dark"] #app .layout .v2-equipment-description small{
 color:var(--contrast-muted)!important
}


/* Safari high-contrast hardening.
   Some WebKit text remains visually filled with the light-theme ink after the theme
   switches. Set both CSS color and the WebKit text fill explicitly on the exact
   heading and chart elements that appear on the management dashboard. */
html[data-mf-theme="dark"] #app .layout .page-head h2,
html[data-mf-theme="dark"] #app .layout .v2-cmd-head h3,
html[data-mf-theme="dark"] #app .layout .v2-cmd-hbar > span > b,
html[data-mf-theme="dark"] #app .layout .v2-cmd-number b,
html[data-mf-theme="dark"] #app .layout .v2-cmd-actions strong,
html[data-mf-theme="dark"] #app .layout .v2-cmd-stages em {
 color:#f4f8fd!important;
 -webkit-text-fill-color:#f4f8fd!important;
 opacity:1!important;
}
html[data-mf-theme="dark"] #app .layout .page-head p:not(.eyebrow),
html[data-mf-theme="dark"] #app .layout .v2-cmd-head p,
html[data-mf-theme="dark"] #app .layout .v2-cmd-hbar > span > small,
html[data-mf-theme="dark"] #app .layout .v2-cmd-age > div > span,
html[data-mf-theme="dark"] #app .layout .stat .label,
html[data-mf-theme="dark"] #app .layout .stat .note {
 color:#c6d8e6!important;
 -webkit-text-fill-color:#c6d8e6!important;
 opacity:1!important;
}
html[data-mf-theme="dark"] #app .layout .v2-cmd-hbar > strong,
html[data-mf-theme="dark"] #app .layout .v2-cmd-line > div {
 color:#afdfff!important;
 -webkit-text-fill-color:#afdfff!important;
 opacity:1!important;
}
html[data-mf-theme="dark"] #app .layout .stat .value {
 color:#f4f8fd!important;
 -webkit-text-fill-color:#f4f8fd!important;
 opacity:1!important;
}
html[data-mf-theme="dark"] #app .layout .v2-cmd-kpis .stat:nth-child(2) .value {
 color:#ffb4ad!important;
 -webkit-text-fill-color:#ffb4ad!important;
}
html[data-mf-theme="dark"] #app .layout .v2-cmd-kpis .stat:nth-child(4) .value,
html[data-mf-theme="dark"] #app .layout .v2-cmd-kpis .stat:nth-child(5) .value,
html[data-mf-theme="dark"] #app .layout .v2-cmd-head small {
 color:#f3cf94!important;
 -webkit-text-fill-color:#f3cf94!important;
 opacity:1!important;
}
html[data-mf-theme="dark"] #app .layout .v2-cmd-hbar > span,
html[data-mf-theme="dark"] #app .layout .v2-cmd-kpis .stat {
 opacity:1!important;
}
/* Keep light mode unaffected; status colors still follow actual ticket states. */
