﻿/* ========================================================================== */
/* CONFIGURAÇÕES GLOBAIS E TIPOGRAFIA */

:root {
    --mud-typography-default-family: 'Roboto', sans-serif !important;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
}


body {
    font-family: 'Roboto', sans-serif !important;
    font-optical-sizing: auto;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

.mud-typography, .mud-button-root, .mud-input {
    font-family: inherit !important;
}


/* ========================================================================== */
/* LAYOUT E ESTRUTURA (Containers) */

.mud-appbar-fixed-top {
    right: calc(100vw - 100%) !important;
}

.mud-main-content {
    padding-bottom: 90px !important;
}

.menu-usuario-largura {
    min-width: 320px !important;
}

.barra-totais-flutuante {
    position: fixed;
    bottom: 35px;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 99;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.25);
}

.footer-bar {
    position: fixed;
    bottom: 0;
    width: 100%;
    padding: 1rem 0;
    background-color: #1f3447;
    color: white;
    z-index: 100;
}

/* ========================================================================== */
/* UTILITÁRIOS E UI COMPONENTS */

.text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.validation-message {
    color: #d32f2f;
    font-size: 0.75rem;
    margin-top: 2px;
}

.style-scroll::-webkit-scrollbar,
.kanban-column-scroll::-webkit-scrollbar {
    width: 6px;
}

.style-scroll::-webkit-scrollbar-track,
.kanban-column-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.style-scroll::-webkit-scrollbar-thumb,
.kanban-column-scroll::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 10px;
}

/* Loader */
.loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 1;
    transition: opacity 0.45s ease;
}

    .loader.hidden {
        opacity: 0;
        pointer-events: none;
    }


.backdrop-blur-sm {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.backdrop-blur-md {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}


/* Animação de pulsação suave */

@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.7);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(244, 67, 54, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(244, 67, 54, 0);
    }
}

@keyframes pulse-orange {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.4);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(255, 152, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 152, 0, 0);
    }
}

.pulse-error {
    animation: pulse-red 1.5s infinite; /* Mais rápido */
    border-radius: 16px;
}

.pulse-warning {
    animation: pulse-orange 3s infinite; /* Mais lento/suave */
    border-radius: 16px;
}



/* ========================================================================== */
/* IMPRESSÃO */
/* Elementos que só aparecem na impressão */
.only-print {
    display: none !important;
}

@media print {
    /* Oculta elementos gerais da aplicação (menus, navbars, botões) */
    .mud-drawer, .mud-appbar, .no-print, button, .mud-button {
        display: none !important;
    }

    /* Exibe elementos específicos de impressão */
    .only-print {
        display: block !important;
    }

    /* Configuração da página A4 e margens */
    @page {
        size: A4 portrait;
        margin: 12mm 10mm 15mm 10mm;
    }

    body {
        background-color: #ffffff !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Garante que o container ocupe a largura correta */
    #area-impressao {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        background-color: transparent !important;
    }

    /* Evita que cards ou tabelas sejam cortados ao meio na quebra de página */
    .mud-paper, tr, .mud-grid-item {
        page-break-inside: avoid;
    }
}