/* CRÍTICO: Esconde body e desabilita transições até estar pronto */
html:not(.ready) {
    visibility: hidden;
}

html:not(.ready) *,
html:not(.ready) *::before,
html:not(.ready) *::after {
    transition: none !important;
    animation: none !important;
}

/* Quando pronto, mostra tudo */
html.ready {
    visibility: visible;
}

/* Transições de tema apenas quando explicitamente trocando o tema (clique do usuário) */
html.theme-transition,
html.theme-transition *,
html.theme-transition *::before,
html.theme-transition *::after {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

.theme-check {
    opacity: 0;
    color: var(--bs-primary);
    transition: opacity 0.2s ease;
}

[data-theme].active {
    background-color: var(--bs-primary-bg-subtle);
}

[data-theme].active .theme-check {
    color: var(--bs-dropdown-link-active-color);
    opacity: 1;
}
