/* ================================================================
   PHS.Web — estilos específicos do app

   Tokens e estruturas compartilhadas vivem em:
     css/tema.css                         (neutro)
     css/tema-phs.css               (marca)
   Aqui ficam apenas: reset base, tela de carregamento e ajustes
   pontuais do app sobre o MudBlazor.
   ================================================================ */

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#app {
    height: 100%;
}

/* ---- Tela de carregamento (preloader): uma bolinha girando no centro ---- */
.preloader {
    position: fixed;
    inset: 0;
    background: #1A1A1A; /* carvão */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    position: relative;
    width: 40px;
    height: 40px;
    animation: spin .9s linear infinite;
}

.spinner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 12px;
    height: 12px;
    margin-left: -6px;
    border-radius: 50%;
    background: #B08D57; /* latão */
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Respeita quem prefere menos animação */
@media (prefers-reduced-motion: reduce) {
    .spinner {
        animation: none;
    }
}

/* ---- Ajustes pontuais do app sobre o MudBlazor ---- */
.mud-input-control {
    margin-bottom: 8px;
}

/* Seletor de empresa no appbar — largura fluida e legível no mobile */
/* Filtro de empresa das telas do painel: cabe o nome sem truncar */
.empresa-filtro {
    min-width: 180px;
}

@media (max-width: 600px) {
    .empresa-filtro {
        min-width: 0;
    }
}

/* Conteúdo principal não cola nas bordas em telas muito largas */
.main-content {
    max-width: 1600px;
    margin-inline: auto;
}
