/* MIPEDD Project HQ V1 – unified day/night normalization */
html{color-scheme:light}html[data-theme="dark"],body.dark{color-scheme:dark}
body{background:#eef5f8!important;color:#082f46!important}
body:not(.dark) h1,body:not(.dark) h2,body:not(.dark) h3,body:not(.dark) h4,body:not(.dark) b,body:not(.dark) strong{color:#082f46}
body:not(.dark) main>header h1,body:not(.dark) main>header h2,body:not(.dark) main>header b,body:not(.dark) main>header strong{color:#fff}
body:not(.dark) main>header small{color:#a9d7e8}
body:not(.dark) input,body:not(.dark) select,body:not(.dark) textarea{background:#fff!important;color:#082f46!important;border-color:#bfd6e0!important}
body:not(.dark) input::placeholder,body:not(.dark) textarea::placeholder{color:#748d99!important;opacity:1}
body:not(.dark) option{background:#fff;color:#082f46}
body:not(.dark) a{color:#087da6}
body:not(.dark) main>header>a{color:#8ce3fb!important}
body:not(.dark) button{color:inherit}
html[data-theme="dark"] body,body.dark{background:#031521!important;color:#eaf7fb!important}
html[data-theme="dark"] h1,html[data-theme="dark"] h2,html[data-theme="dark"] h3,html[data-theme="dark"] h4,html[data-theme="dark"] b,html[data-theme="dark"] strong,body.dark h1,body.dark h2,body.dark h3,body.dark h4,body.dark b,body.dark strong{color:#f1f9fc}
html[data-theme="dark"] p,html[data-theme="dark"] label,html[data-theme="dark"] li,body.dark p,body.dark label,body.dark li{color:#c2d7e0}
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea,body.dark input,body.dark select,body.dark textarea{background:#09283a!important;color:#edf8fc!important;border-color:#2b5a70!important}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder,body.dark input::placeholder,body.dark textarea::placeholder{color:#91adba!important;opacity:1}
html[data-theme="dark"] option,body.dark option{background:#09283a;color:#edf8fc}
html[data-theme="dark"] a,body.dark a{color:#68d8f5}
html[data-theme="dark"] main>header,body.dark main>header{background:linear-gradient(120deg,#021a2a,#063e57)!important}
html[data-theme="dark"] main>header>a,body.dark main>header>a{color:#7fe1fa!important}
html[data-theme="dark"] main>header button,body.dark main>header button{background:#0c3044!important;color:#eaf7fb!important;border-color:#2c6279!important}
html[data-theme="dark"] article,html[data-theme="dark"] section,html[data-theme="dark"] aside,body.dark article,body.dark section,body.dark aside{border-color:#164d68}
html[data-theme="dark"] [class*="summary"] article,html[data-theme="dark"] [class*="card"],body.dark [class*="summary"] article,body.dark [class*="card"]{background-color:#082638}
html[data-theme="dark"] [class*="meta"] span,html[data-theme="dark"] [class*="tags"] span,body.dark [class*="meta"] span,body.dark [class*="tags"] span{background:#0d3449;color:#d9eef5}
html[data-theme="dark"] table th,body.dark table th{background:#0b3146!important;color:#cce4ed!important}
html[data-theme="dark"] table td,body.dark table td{color:#e5f3f8;border-color:#164d68!important}
html[data-theme="dark"] .empty,body.dark .empty{background:#082638!important;color:#b9d0da!important}
#globalThemeToggle{position:fixed!important;right:24px!important;bottom:24px!important;z-index:9999!important;min-width:112px!important;height:44px!important;border-radius:24px!important;border:1px solid #8cc9dc!important;background:#effaff!important;color:#083d58!important;font-weight:900!important;box-shadow:0 8px 24px rgba(0,32,50,.15)!important}
html[data-theme="dark"] #globalThemeToggle,body.dark #globalThemeToggle{background:#0b3044!important;color:#eaf7fb!important;border-color:#39758e!important;box-shadow:0 8px 24px rgba(0,0,0,.28)!important}
@media(max-width:700px){#globalThemeToggle{right:12px!important;bottom:12px!important;min-width:96px!important}}

/* Project cockpit lifecycle cards: explicit contrast in both themes */
body:not(.dark) .work-grid>a{background:linear-gradient(135deg,#07354d,#0a5875)!important;color:#fff!important}body:not(.dark) .work-grid>a b,body:not(.dark) .work-grid>a h3{color:#fff!important}body:not(.dark) .work-grid>a p{color:#d5eaf2!important}body:not(.dark) .work-grid>a small{color:#7fe1fa!important}body:not(.dark) .work-grid>a>span{color:#d9f5ff!important}html[data-theme="dark"] .work-grid>a,body.dark .work-grid>a{background:linear-gradient(135deg,#082a3d,#0a435b)!important;color:#f3fbfe!important;border-color:#1f607a!important}html[data-theme="dark"] .work-grid>a b,html[data-theme="dark"] .work-grid>a h3,body.dark .work-grid>a b,body.dark .work-grid>a h3{color:#fff!important}html[data-theme="dark"] .work-grid>a p,body.dark .work-grid>a p{color:#c5dde7!important}html[data-theme="dark"] .work-grid>a small,body.dark .work-grid>a small{color:#68d8f5!important}

/* Final night polish – Project Cockpit */
html[data-theme="dark"] .identity .chips span,body.dark .identity .chips span{background:#123e54!important;color:#d9eef5!important;border:1px solid #285a70!important}html[data-theme="dark"] .identity .progress>div,body.dark .identity .progress>div{background:#315264!important}html[data-theme="dark"] .identity .progress>div i,body.dark .identity .progress>div i{background:#18bd78!important}html[data-theme="dark"] .kpis article,body.dark .kpis article{background:#082638!important;border-color:#164d68!important;border-left-color:#18a8d5!important}html[data-theme="dark"] .kpis article small,body.dark .kpis article small{color:#7aa9bd!important}html[data-theme="dark"] .kpis article span,body.dark .kpis article span{color:#8eafbd!important}html[data-theme="dark"] .next,body.dark .next{border-top-color:#18a8d5!important}html[data-theme="dark"] .project-quality-link a,body.dark .project-quality-link a{background:#0d3449!important;color:#68d8f5!important;border-color:#285a70!important}html[data-theme="dark"] .bottom-grid article,body.dark .bottom-grid article{background:#082638!important;border-color:#164d68!important}

/* Night final: remove remaining light islands in cockpit */
html[data-theme="dark"] .bottom-grid .mini span,body.dark .bottom-grid .mini span{background:#123e54!important;color:#d9eef5!important;border:1px solid #285a70!important}html[data-theme="dark"] .bottom-grid .signal,body.dark .bottom-grid .signal{background:#123a2a!important;color:#7ce0a5!important;border:1px solid #2b6849!important}html[data-theme="dark"] .bottom-grid article,body.dark .bottom-grid article{color:#eaf7fb!important}html[data-theme="dark"] .bottom-grid article p,body.dark .bottom-grid article p{color:#c2d7e0!important}html[data-theme="dark"] .bottom-grid article header a,body.dark .bottom-grid article header a{color:#68d8f5!important}
