/* --- ESTILOS GERAIS (TELA) --- */
body {
    background-color: #121212 !important;
    color: #e0e0e0 !important;
    font-family: 'Segoe UI', sans-serif;
}

.card {
    background-color: #1e1e1e !important; /* Remove o branco padrão */
    border: 1px solid #333 !important;
    color: #e0e0e0 !important; /* Texto claro */
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

/* Garante que tabelas dentro dos cards sejam escuras */
.table {
    color: #ddd !important;
    border-color: #444 !important;
}

.table thead th {
    border-bottom: 2px solid #555 !important;
    color: #fff !important;
}

.table td, .table th {
    border-top: 1px solid #444 !important;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

/* Ajuste dos inputs de arquivo para não ficarem brancos */
.upload-btn-wrapper input[type=file] {
    color: #fff;
}

/* 2. O Input Invisível (Ocupa tudo e fica no topo) */
.upload-btn-wrapper input[type=file] {
    font-size: 100px;
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
     /* Força o ponteiro de "mãozinha" */
    z-index: 2;      /* Fica acima do botão */
}

/* 3. Efeito de Hover: Quando o mouse passa sobre a Wrapper, 
   o Botão lá dentro muda de cor E o texto muda para preto */
.upload-btn-wrapper:hover .btn {
    background-color: #e98401 !important;
    color: #000 !important; /* Muda a cor do texto para preto no hover */
    
}

.btn:hover {
    background-color: #e98401 !important;
    color: #000 !important; /* Muda a cor do texto para preto no hover */
    
}

/* 4. Estilo base do Botão (para garantir a transição suave) */
.btn {
    border: 1px solid #e98401;
    color: #ffffff;
    background-color: transparent;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    
    transition: all 0.3s ease; /* Transição suave para cor e fundo */
    position: relative;
    z-index: 1; /* Fica abaixo do input */
}

#btnPrint {
    position: relative;
    z-index: 10;
}


.btn-outline-warning {
    color: #e98401;
    border-color: #e98401;
}
.btn-outline-warning:hover {
    background-color: #e98401;
    color: #fff;
}


.dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.card {
    background: #2a2a2a;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.full-width {
    grid-column: 1 / -1;
}

/* Ajuste dos títulos para garantir que não fiquem pretos */
h1, h2, h3, h4, h5, h6 {
    color: #fff !important;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    text-align: center;
}

.stat-item strong {
    display: block;
    font-size: 0.9em;
    color: #888;
    margin-bottom: 5px;
}

.stat-item span {
    font-size: 1.4em;
    color: #e98401;
    font-weight: bold;
}

#container3d {
    width: 100%;
    height: 500px;
    border-radius: 4px;
    overflow: hidden;
    background: #000;
}


/* --- WIDGET DE FEEDBACK FLUTUANTE --- */
#feedbackWidget {
    position: fixed; /* Isso é o que faz ele flutuar sobre o site */
    bottom: 30px;
    right: 30px;
    z-index: 1050; /* Garante que fique acima de outros elementos */
    transition: opacity 0.5s ease, transform 0.5s ease;
    opacity: 1;
}

.fade-out {
    opacity: 0 !important;
    pointer-events: none; /* Impede cliques enquanto some */
    transform: translateY(10px); /* Desce um pouquinho enquanto some */
}

.feedback-container {
    background-color: #d00303;
    border: 1px solid #444;
    border-radius: 50px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
}

.feedback-container:hover {
    border-color: #666;
    transform: translateY(-2px);
}

.feedback-label {
    color: #ccc;
    font-size: 0.9em;
    font-weight: 600;
}

.feedback-buttons {
    display: flex;
    gap: 10px;
}

.btn-feedback {
    background: transparent;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    transition: transform 0.2s;
    padding: 0;
    line-height: 1;
}

.btn-feedback:hover { transform: scale(1.2); }
.btn-like:hover { filter: drop-shadow(0 0 5px #00d4ff); }
.btn-dislike:hover { filter: drop-shadow(0 0 5px #ff6384); }

/* --- VERSÃO MOBILE (Centralizado e mais seguro) --- */
@media (max-width: 768px) {
    #feedbackWidget {
        right: auto;      /* Remove alinhamento à direita */
        left: 50%;        /* Move para o meio */
        transform: translateX(-50%); /* Centraliza exato */
        bottom: 20px;
        width: 90%;       /* Garante que não estoure a tela */
        max-width: 350px;
        display: flex;
        justify-content: center;
    }
    
    .feedback-container {
        width: 100%;
        justify-content: space-between; /* Espalha o texto e botões */
    }
}


.print-only { display: none; }

/* --- CONFIGURAÇÃO DE IMPRESSÃO (PDF / DATASHEET) --- */
@media print {
    @page {
        size: A4;
        margin: 1.5cm;
    }

    html, body {
        background: white !important;
        color: black !important;
        /* Reset do contador global no HTML para garantir que o body o veja */
        counter-reset: page; 
    }

    body {
        padding-top: 60px; 
        padding-bottom: 60px;
    }

    footer{
        display: none !important;
    }

    .print-only { display: block !important; }

    /* Cabeçalho e Rodapé Fixos */
    .header-sheet {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        background: white;
        z-index: 1000;
    }

    .footer-sheet {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        background: white;
        z-index: 1000;
    }

    /* Lógica do Contador de Páginas */
    .page-count::after {
        counter-increment: page;
        content: counter(page);
    }

    /* Forçar Gráficos a serem Cinza Suave no papel */
    canvas {
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
        max-width: 100% !important;
        height: auto !important;
        /* Suaviza as linhas pretas da grade para cinza visualmente */
       filter: saturate(1.2) !important;
    }

    #mainDashboard {
        display: block !important; /* Muda grid para block para fluir as páginas */
    }

    .card {
        break-inside: avoid; /* Evita cortes no meio do gráfico */
        page-break-inside: avoid;
        border: 1px solid #eee !important;
        margin-bottom: 20px !important;
        padding: 15px !important;
        background: #fff !important;
        box-shadow: none !important;
    }



    .curva_cone_card {

        height: auto !important;
        
    }   

    /* Cores de Texto para Impressão */
    h1, h2, h3, h4, span, strong, p, div { 
        color: black !important; 
    }
    
    #headerManufac { 
        color: #e98401 !important; 
    }

    /* Ocultar elementos de Interface */
    header, .upload-btn-wrapper, .btn, #loading, .legenda_3d {
        display: none !important;
    }

    .card-3d-fullwidth
    {
        display: inline-block;
        margin-top: 70px;
    }

    #container3d {
    display: inline-flex !important;
    
    height: 400px;
    border-radius: 4px;
    background: #000;
    }

    h3 {  display: block !important; color: black !important; } 


}