/* ==========================================================================
   Legibilidade — sem blur / vidro / película (claro + escuro)
   Superfícies sólidas · texto nítido
   ========================================================================== */

html,
body,
#appLayout,
#viewContainer,
.main-wrapper,
.content,
.sidebar,
.topbar,
.card,
.smart-card,
.modal,
.me-modal,
.landing-card,
.celebration-card,
.crew-modal,
.ai-drawer,
.btn-ialtum,
.os6-seal,
.emo-ambiance,
.flow-chrome-bar,
.overlay,
.context-panel-inner,
.tower-cmd-col,
.tower-cmd-pulse,
.altum-capacity-box,
.altum-roi-box,
.altum-license-box,
.altum-learning-box,
.op-stats,
.hj-panel,
.insights-panel,
.vds-instrument,
.co-focus-card,
.co-orbit-ring-c {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.modal,
.landing-card,
.celebration-card,
.me-modal,
.ai-drawer,
#viewContainer,
.content,
.main-wrapper {
    filter: none !important;
}

body.flow-active #viewContainer {
    filter: none !important;
    opacity: 1 !important;
}

/* Película / brilho fantasma em cima do texto */
body.dark-mode #viewContainer .card::before,
body.dark-mode #viewContainer .smart-card::before,
body.dark-mode #viewContainer .vds-instrument::before,
body.dark-mode #viewContainer .tower-cmd-person::before,
body.dark-mode #viewContainer .cockpit-dir-hero::before,
body:not(.light-mode) #viewContainer .card::before,
body:not(.light-mode) #viewContainer .smart-card::before,
body:not(.light-mode) #viewContainer .vds-instrument::before,
body:not(.light-mode) #viewContainer .cockpit-dir-hero::before {
    display: none !important;
    content: none !important;
    opacity: 0 !important;
}

body.dark-mode #viewContainer .cockpit-dir-hero-glow,
body:not(.light-mode) #viewContainer .cockpit-dir-hero-glow {
    display: none !important;
    opacity: 0 !important;
}

/* Overlays inativos não podem deixar véu na tela */
.overlay:not(.show):not(.ativo),
.landing-overlay:not(.ativo),
.celebration-overlay:not(.show):not(.ativo),
.first-impact-overlay:not(.show):not(.ativo),
.wow-moment-overlay:not(.show):not(.ativo) {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    background: transparent !important;
}

/* —— Escuro: contraste alto, sem película —— */
body.dark-mode,
body:not(.light-mode) {
    --text-main: #f7f8fa;
    --text-muted: #c5ced9;
    --bg-base: #0b1018;
    --bg-card: #141b28;
    color: #f7f8fa;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.dark-mode #viewContainer,
body.dark-mode .content,
body.dark-mode .main-wrapper,
body:not(.light-mode) #viewContainer,
body:not(.light-mode) .content {
    color: #f7f8fa !important;
    background-color: #0b1018;
    opacity: 1 !important;
}

body.dark-mode #viewContainer .card,
body.dark-mode #viewContainer .smart-card,
body.dark-mode #viewContainer .altum-capacity-box,
body.dark-mode #viewContainer .altum-roi-box,
body.dark-mode #viewContainer .altum-license-box,
body.dark-mode #viewContainer .altum-learning-box,
body.dark-mode #viewContainer .op-stats,
body.dark-mode #viewContainer .hj-panel,
body.dark-mode #viewContainer .tower-cmd-col,
body.dark-mode #viewContainer .insights-panel,
body.dark-mode #viewContainer .vds-instrument,
body.dark-mode #viewContainer .emo-ambiance,
body.dark-mode #viewContainer .co-focus-card,
body.dark-mode #viewContainer .mission-center,
body.dark-mode #viewContainer .mc-hero,
body.dark-mode #viewContainer .cockpit-dir-hero,
body:not(.light-mode) #viewContainer .card,
body:not(.light-mode) #viewContainer .co-focus-card {
    background: #141b28 !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
    color: #f7f8fa !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
    opacity: 1 !important;
}

body.dark-mode #viewContainer h1,
body.dark-mode #viewContainer h2,
body.dark-mode #viewContainer h3,
body.dark-mode #viewContainer p,
body.dark-mode #viewContainer li,
body.dark-mode #viewContainer label,
body.dark-mode #viewContainer .cinzel,
body.dark-mode #viewContainer .oswald,
body:not(.light-mode) #viewContainer h1,
body:not(.light-mode) #viewContainer p {
    color: #f7f8fa;
    text-shadow: none !important;
    opacity: 1 !important;
}

body.dark-mode #viewContainer .text-muted,
body.dark-mode #viewContainer .co-focus-hint,
body.dark-mode #viewContainer .co-focus-text,
body.dark-mode #viewContainer .emo-ambiance-help,
body:not(.light-mode) #viewContainer .text-muted {
    color: #c5ced9 !important;
    opacity: 1 !important;
}

body.dark-mode .topbar,
body.dark-mode .sidebar,
body:not(.light-mode) .topbar {
    background: #0d121c !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    color: #f7f8fa;
}

body.dark-mode .topbar-route,
body.dark-mode .nav-item,
body.dark-mode .nav-title {
    color: #d7dee8 !important;
}

body.dark-mode .nav-item.active,
body.dark-mode .nav-item:hover {
    color: #ffffff !important;
}

body.dark-mode .modal,
body.dark-mode .me-modal,
body.dark-mode .landing-card,
body.dark-mode .celebration-card,
body.dark-mode .crew-modal.card,
body.dark-mode #aiDrawer.ai-drawer,
body:not(.light-mode) #aiDrawer.ai-drawer {
    background: #121926 !important;
    color: #f7f8fa !important;
}

body.dark-mode .text-muted,
body.dark-mode .oswald.text-muted,
body:not(.light-mode) .text-muted {
    color: #c5ced9 !important;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode .cinzel,
body:not(.light-mode) .cinzel {
    color: #f7f8fa;
}

body.dark-mode .btn-topbar,
body.dark-mode .btn-outline,
body:not(.light-mode) .btn-topbar {
    border-color: rgba(255, 255, 255, 0.28) !important;
    color: #f0f4fa !important;
}

body.dark-mode .ialtum-officer,
body.dark-mode .ialtum-presence {
    background: #171e2c !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
}

body.dark-mode .ialtum-officer-observe,
body.dark-mode .ialtum-presence-text {
    color: #f0f4fa !important;
}

body.dark-mode.flow-active #missionCycleModal,
body:not(.light-mode).flow-active #missionCycleModal {
    background: rgba(6, 8, 12, 0.94) !important;
}

body.dark-mode.co-calm .co-focus-card,
body:not(.light-mode).co-calm .co-focus-card {
    background: #151d2c !important;
    border-color: rgba(212, 174, 87, 0.35) !important;
}

body.dark-mode.co-calm .co-focus-text,
body.dark-mode.co-calm .co-focus-hint {
    color: #c5ced9 !important;
    opacity: 1 !important;
}

/* —— Claro —— */
body.light-mode {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    color: #1f2a37;
}

body.light-mode #viewContainer {
    color: #1f2a37;
}

body.light-mode #viewContainer .card,
body.light-mode #viewContainer .smart-card,
body.light-mode #viewContainer .altum-capacity-box,
body.light-mode #viewContainer .altum-roi-box,
body.light-mode #viewContainer .altum-license-box,
body.light-mode #viewContainer .altum-learning-box,
body.light-mode #viewContainer .op-stats,
body.light-mode #viewContainer .hj-panel,
body.light-mode #viewContainer .tower-cmd-col,
body.light-mode #viewContainer .insights-panel,
body.light-mode #viewContainer .vds-instrument {
    background: #ffffff !important;
    border-color: rgba(12, 43, 91, 0.14) !important;
    color: #1f2a37 !important;
    box-shadow: 0 8px 24px rgba(12, 43, 91, 0.06) !important;
}

body.light-mode .topbar,
body.light-mode .sidebar {
    background: #ffffff !important;
    border-color: rgba(12, 43, 91, 0.12) !important;
    color: #1f2a37;
}

body.light-mode .modal,
body.light-mode .me-modal,
body.light-mode .landing-card,
body.light-mode .celebration-card,
body.light-mode .crew-modal.card,
body.light-mode #aiDrawer.ai-drawer {
    background: #ffffff !important;
    color: #1f2a37 !important;
}

body.light-mode .text-muted,
body.light-mode .oswald.text-muted {
    color: #4a5a6a !important;
}

body.light-mode h1,
body.light-mode h2,
body.light-mode h3,
body.light-mode .cinzel {
    color: #1f2a37;
}

body.light-mode .overlay,
body.light-mode .landing-overlay,
body.light-mode .celebration-overlay,
body.light-mode.flow-active #missionCycleModal {
    background: rgba(244, 246, 248, 0.92) !important;
}

body.vds-vp01 {
    --vds-glass-bg: #141b28;
    --vds-glass-blur: 0px;
}

body.vds-vp01.light-mode {
    --vds-glass-bg: #ffffff;
}

body.vds-vp01 #viewContainer .card,
body.vds-vp01 #viewContainer .smart-card,
body.vds-vp01 #viewContainer .vds-instrument {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body.vds-vp01.dark-mode #viewContainer .cockpit-dir-hero,
body.vds-vp01:not(.light-mode) #viewContainer .cockpit-dir-hero,
body.vds-vp01.dark-mode #viewContainer .mc-hero,
body.vds-vp01:not(.light-mode) #viewContainer .mc-hero {
    background: #141b28 !important;
}
