/* =========================
   VARIÁVEIS DA EVERLINE
========================= */
:root {
    --primary: #08264d;
    --accent: #16e0c2;
    --white: #ffffff;
    --bg-light: #f5f8fc;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    min-height: 100vh;
}

/* =========================
   MENU PADRÃO (Importado do site)
========================= */
header {
    
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(8, 38, 77, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(22, 224, 194, 0.1);
}

.logo img {
    height: 38px;
    width: auto;
}

nav {
    display: flex;
    align-items: center;
}

nav a {
    color: var(--white);
    text-decoration: none;
    margin-left: 45px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.btn-orcamento {
    border: 1px solid var(--accent);
    padding: 12px 30px;
    border-radius: 3px;
}

/* =========================
   CONTAINER PRINCIPAL
========================= */
.diag-page-container {
    padding-top: 120px; 
    /* Ajusta a altura da faixa azul para ficar proporcional atrás do card */
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary) 350px, var(--bg-light) 350px);
    min-height: 100vh;
    position: relative;
    z-index: 1;
    overflow: hidden; /* Garante que a marca d'água não crie barra de rolagem */
}

.container { 
    width: 100%; 
    max-width: 1100px; 
    margin: 0 auto; 
    padding: 0 20px 80px; 
    position: relative; 
    z-index: 2;         
}

/* --- MARCA D'ÁGUA GIGANTE NO FUNDO --- */
.diag-page-container::after {
    content: '';
    position: absolute;
    top: 50px; /* Sobe a imagem para cruzar a faixa azul do topo */
    right: -10%; /* Joga um pouco para fora da tela na direita */  
    width: 900px; /* Tamanho gigante */
    height: 900px;
    background-image: url('images/Cavalo_Cortado-Site.png'); 
    background-size: contain;
    background-repeat: no-repeat;
    background-position: right center;
    opacity: 0.08;
    z-index: 0; /* Garante que fique atrás do cartão branco e na frente do fundo */
    pointer-events: none; 
}

.header-title {
    text-align: center;
    margin-bottom: 40px;
    color: var(--white);
}

.header-title h1 {
    font-size: 38px;
    font-weight: 300;
    margin-bottom: 10px;
}

.header-title p {
    font-size: 15px;
    opacity: 0.8;
}

/* =========================
   CARDS E FORMS
========================= */
.card {
    background: var(--white);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.card h2 {
    font-weight: 800;
    color: var(--primary);
    font-size: 28px;
    margin-bottom: 5px;
}

.descricao {
    color: var(--text-gray);
    margin-bottom: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
}

.form-group input {
    width: 100%;
    height: 50px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0 15px;
    font-family: 'Montserrat', sans-serif;
    transition: 0.3s;
}

.form-group input:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(22, 224, 194, 0.1);
}

.tipos-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.tipo-card {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 25px;
    cursor: pointer;
    transition: 0.3s;
    text-align: center;
}

.tipo-card:hover {
    border-color: var(--accent);
    background: #f0fdfa;
    transform: translateY(-3px);
}

.tipo-card h4 {
    font-weight: 800;
    color: var(--primary);
    font-size: 18px;
    margin-bottom: 10px;
}

/* =========================
   QUESTIONÁRIO & BOTÕES
========================= */
.tag-tipo {
    font-size: 11px;
    font-weight: 800;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
}

#categoriaAtual {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    margin-top: 5px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 10px;
    margin-bottom: 40px;
    overflow: hidden;
}

#progressBar {
    height: 100%;
    width: 0%;
    background: var(--accent);
    transition: width 0.4s ease;
}

.pergunta-numero { 
    font-size: 12px; 
    font-weight: 700; 
    color: var(--primary); 
    margin-bottom: 10px; 
}

.pergunta-texto { 
    font-size: 22px; 
    font-weight: 400; 
    color: var(--primary); 
    margin-bottom: 30px; 
    line-height: 1.4; 
}

.opcoes {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

.opcao {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    padding: 20px 5px;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
    font-family: 'Montserrat';
}

.opcao:hover {
    border-color: var(--accent);
}

.opcao.selecionada {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--white);
}

.opcao strong { 
    display: block; 
    font-size: 24px; 
    margin-bottom: 5px; 
    color: var(--primary);
}
.opcao.selecionada strong,
.opcao.selecionada span { 
    color: var(--white); 
}
.opcao span {
    font-size: 11px;
    font-weight: 600;
}

.navegacao {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.btn {
    border: none;
    border-radius: 4px;
    padding: 15px 35px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.3s;
    font-family: 'Montserrat';
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--accent);
    color: var(--primary);
}

.btn-secondary {
    background: #e5e7eb;
    color: var(--text-dark);
}

.btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* =========================
   DASHBOARD DE RESULTADO
========================= */
.card-resultado {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 50px;
}

.resultado-header {
    display: flex;
    align-items: center;
    gap: 40px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 40px;
    margin-bottom: 40px;
}

.resultado-peca img {
    height: 120px;
    width: auto;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.1));
}

.nota-gigante {
    font-size: 80px;
    font-weight: 300;
    color: var(--accent);
    line-height: 1;
    letter-spacing: -3px;
}

.nota-gigante small {
    font-size: 30px;
    color: var(--text-gray);
}

.resultado-tag {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 3px;
    display: block;
    margin-top: 10px;
}

#resultadoTitulo {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    margin-top: 5px;
}

.dashboard-grid { 
    display: grid; 
    grid-template-columns: 1.1fr 0.9fr; 
    gap: 30px; 
    margin-bottom: 40px; 
    align-items: center; 
}

.chart-container { 
    position: relative; 
    height: 380px; 
    width: 100%; 
    padding: 10px; /* Garante margem interna */
}

.pontuacao-detalhada h3 {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.category-list {
    list-style: none;
}

.category-list li {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.category-list li span {
    color: var(--primary);
    font-weight: 800;
    font-size: 16px;
}

.resultado-texto-box {
    background: #f8fafc;
    padding: 30px;
    border-left: 4px solid var(--accent);
    border-radius: 0 8px 8px 0;
    margin-bottom: 40px;
}

.resultado-texto-box p {
    line-height: 1.8;
    color: var(--text-dark);
    white-space: pre-line;
}

.acoes-finais {
    display: flex;
    gap: 20px;
    justify-content: flex-end;
}

.acoes-finais a {
    text-decoration: none;
}

/* Responsividade */
@media (max-width: 768px) {
    header {
        padding: 15px;
    }

    nav a {
        display: none;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .opcoes {
        grid-template-columns: repeat(3, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .resultado-header {
        flex-direction: column;
        text-align: center;
    }

    .acoes-finais {
        flex-direction: column;
    }
}

.hidden {
    display: none !important;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #e5e7eb;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
.acoes-finais .btn-primary {
    background: var(--primary);
    color: var(--white) !important; /* Força o texto a ficar branco */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.acoes-finais .btn-primary:hover {
    background: var(--accent);
    color: var(--primary) !important;
}
/* ============================================================
   CORREÇÃO FINAL - RESULTADO DO DIAGNÓSTICO
   Everline - modelo sem peça laranja
============================================================ */

/* CARD PRINCIPAL DO RESULTADO */
.card-resultado {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 12px;
    padding: 45px 50px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* ============================================================
   CABEÇALHO
============================================================ */

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
    padding-top: 70px;
    position: relative;
    z-index: 5;
}

.report-logo img {
    width: auto;
    height: 55px;
    display: block;
}
.report-titles {
    text-align: right;
}

.report-titles h3 {
    margin: 0 0 4px;
    font-size: 19px;
    font-weight: 500;
    color: var(--primary);
}

.report-titles span {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.report-divider {
    width: 100%;
    height: 2px;
    background: #e5e7eb;
    margin-bottom: 30px;
}


/* ============================================================
   NOTA PRINCIPAL
============================================================ */

.resultado-header-pdf {
    display: flex;
    align-items: center;
    gap: 30px;
    width: 100%;
    padding: 10px 0 30px;
    margin-bottom: 25px;
    border-bottom: 1px solid #eeeeee;
}

/* ÍCONE EVERLINE FIXO */
.resultado-peca-fixa {
    width: 105px;
    min-width: 105px;
    height: 105px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.resultado-peca-fixa {
    width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.resultado-peca-fixa img {
    width: 110px;
    height: 110px;
    object-fit: contain;
    display: block;
}

/* BLOCO DA NOTA */
.resultado-destaque {
    text-align: left;
    margin-left: auto;
    margin-right: 40px;
}

.nota-gigante {
    display: flex;
    align-items: baseline;
    font-size: 82px;
    line-height: 0.9;
    font-weight: 300;
    color: var(--accent);
    letter-spacing: -4px;
    margin: 0;
}

.nota-gigante small {
    margin-left: 4px;
    font-size: 28px;
    font-weight: 300;
    color: var(--text-gray);
    letter-spacing: -1px;
}

.resultado-tag {
    display: block;
    margin-top: 10px;
    font-size: 10px;
    font-weight: 800;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 2px;
}

#resultadoTitulo {
    margin: 4px 0 0;
    font-size: 25px;
    line-height: 1.2;
    font-weight: 800;
    color: var(--primary);
}


/* ============================================================
   RADAR
============================================================ */

.report-chart-section {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 0 30px;
}

.chart-container-full {
    position: relative;
    width: 100%;
    max-width: 700px;
    height: 430px;
}


/* ============================================================
   PARTE INFERIOR
============================================================ */

.report-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 45px;
    align-items: start;

    width: 100%;

    border-top: 1px solid #eeeeee;
    padding-top: 30px;
    margin-bottom: 35px;
}

/* TÍTULO DESEMPENHO */
.report-table-box h3 {
    margin: 0 0 18px;

    font-size: 15px;
    font-weight: 800;

    color: var(--primary);

    text-transform: uppercase;
    letter-spacing: 1px;
}

/* LISTA DOS PILARES */
.category-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 14px 0;

    border-bottom: 1px solid #eeeeee;

    font-size: 14px;
    font-weight: 600;

    color: var(--text-dark);
}

.category-list li span {
    color: var(--primary);
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
}


/* ============================================================
   TEXTO DO RESULTADO
============================================================ */

.report-text-box {
    background: #f8fafc;

    padding: 28px;

    border-radius: 8px;

    border-left: 4px solid var(--accent);
}

.report-text-box p {
    margin: 0;

    font-size: 13px;
    line-height: 1.8;

    color: var(--text-dark);

    white-space: pre-line;
}


/* ============================================================
   BOTÕES
============================================================ */

.acoes-finais {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;

    width: 100%;
}

.acoes-finais a {
    text-decoration: none;
}

.acoes-finais .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 48px;

    padding: 14px 25px;

    background: var(--primary);
    color: #ffffff !important;

    border-radius: 4px;

    font-size: 13px;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 1px;
}

.acoes-finais .btn-primary:hover {
    background: var(--accent);
    color: var(--primary) !important;
}


/* ============================================================
   RESPONSIVO
============================================================ */

@media (max-width: 768px) {

    .card-resultado {
        padding: 30px 20px;
    }

    .report-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .report-titles {
        text-align: left;
    }

    .resultado-header-pdf {
        gap: 20px;
    }

    .resultado-peca-fixa {
        width: 80px;
        min-width: 80px;
        height: 80px;
    }

    .resultado-peca-fixa img {
        width: 65px;
        height: 65px;
    }

    .nota-gigante {
        font-size: 60px;
    }

    .nota-gigante small {
        font-size: 22px;
    }

    #resultadoTitulo {
        font-size: 21px;
    }

    .chart-container-full {
        height: 340px;
    }

    .report-bottom-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .acoes-finais {
        flex-direction: column;
        align-items: stretch;
    }

    .acoes-finais a,
    .acoes-finais button {
        width: 100%;
    }
}
.relatorio {
    position: relative;
    overflow: hidden;
}

.roda-superior {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    z-index: 0;
    pointer-events: none;
}

.roda-inferior {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    z-index: 0;
    pointer-events: none;
}
.relatorio > *:not(.roda-superior):not(.roda-inferior) {
    position: relative;
    z-index: 1;
}
/* ============================================================
   DESEMPENHO POR PILAR
   SOMENTE CATEGORIAS
   ============================================================ */

.report-table-box {
    width: 100%;
    min-width: 0;
}

.category-list {
    list-style: none;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* CADA CATEGORIA */
.categoria-relatorio {
    width: 100%;
    margin: 0;
    padding: 13px 0;
    border-bottom: 1px solid #e5e7eb;
}

/* CABEÇALHO DA CATEGORIA */
.categoria-relatorio-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    width: 100%;
    gap: 20px;
}

/* NOME DA CATEGORIA */
.categoria-relatorio-header > strong {
    color: #08264d;
    font-family: "Montserrat", sans-serif;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}

/* NOTA DA CATEGORIA */
.categoria-relatorio-nota {
    display: flex;
    align-items: baseline;
    white-space: nowrap;
    flex-shrink: 0;
}

.categoria-relatorio-nota strong {
    color: #08264d;
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    font-weight: 700;
}

.categoria-relatorio-nota small {
    color: #b7c0cc;
    font-family: "Montserrat", sans-serif;
    font-size: 13px;
    font-weight: 400;
    margin-left: 2px;
}

.pergunta-relatorio-nota small {
    color: #b7c0cc;

    font-family: "Montserrat", sans-serif;
    font-size: 13px;
    font-weight: 400;

    margin-left: 2px;
}

/* ============================================================
   ESPAÇAMENTO ENTRE CATEGORIAS
   ============================================================ */

.categoria-relatorio + .categoria-relatorio {
    padding: 16px 0 0;
}
/* ============================================================
   MODO PDF / IMPRESSÃO - A4
   ============================================================ */

@page {
    size: A4 portrait;
    margin: 0;
}

/* ============================================================
   MODO PDF / IMPRESSÃO - A4 (AJUSTADO PARA PÁGINA ÚNICA)
   ============================================================ */

@page {
    size: A4 portrait;
    margin: 0;
}

@media print {

    html,
    body {
        width: 210mm;
        height: 297mm;
        margin: 0;
        padding: 0;
        background: #ffffff !important;
        overflow: hidden !important;
    }

    /* Esconde o site */
    header {
        display: none !important;
    }

    /* Esconde tudo que não pertence ao relatório */
    .diag-page-container {
        padding: 0 !important;
        margin: 0 !important;
        background: #ffffff !important;
        min-height: auto !important;
    }

    .diag-page-container > .container {
        width: 210mm;
        max-width: none;
        margin: 0;
        padding: 0;
    }

    .header-title,
    #identificacao,
    #questionario,
    .acoes-finais,
    #loadingOverlay,
    #mensagem,
    #btnBaixarPdf {
        display: none !important;
    }

    /* RELATÓRIO COMPACTO PARA 1 PÁGINA */
    #resultado {
        display: block !important;
        width: 210mm;
        height: 297mm;
        max-width: none;
        margin: 0 !important;
        padding: 8mm 12mm 10mm !important;
        background: #ffffff !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        overflow: hidden !important;
    }

    /* Elementos decorativos */
    .roda-superior,
    .roda-inferior {
        position: absolute !important;
        width: 100% !important;
    }

    /* Cabeçalho */
    .report-header {
        padding-top: 8mm !important;
        margin-bottom: 3mm !important;
    }

    .report-logo img {
        height: 11mm !important;
    }

    .report-titles h3 {
        font-size: 11pt !important;
    }

    .report-titles span {
        font-size: 7pt !important;
    }

    .report-divider {
        margin-bottom: 3mm !important;
    }

    /* Nota */
    .resultado-header-pdf {
        gap: 6mm !important;
        padding: 2mm 0 3mm !important;
        margin-bottom: 3mm !important;
    }

    .resultado-peca-fixa {
        width: 20mm !important;
        min-width: 20mm !important;
        height: 20mm !important;
    }

    .resultado-peca-fixa img {
        width: 20mm !important;
        height: 20mm !important;
    }

    .nota-gigante {
        font-size: 38pt !important;
    }

    .nota-gigante small {
        font-size: 14pt !important;
    }

    .resultado-tag {
        font-size: 6pt !important;
        margin-top: 1mm !important;
    }

    #resultadoTitulo {
        font-size: 14pt !important;
    }

    /* RADAR REDUZIDO PARA CABER */
    .report-chart-section {
        margin: 0 0 2mm !important;
    }

    .chart-container-full {
        width: 85mm !important;
        max-width: 85mm !important;
        height: 44mm !important;
        margin: 0 auto !important;
    }

    /* Parte inferior compacta */
    .report-bottom-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 6mm !important;
        padding-top: 4mm !important;
        margin-top: 2mm !important;
        margin-bottom: 0 !important;
    }

    .report-table-box h3 {
        font-size: 8pt !important;
        margin-bottom: 2mm !important;
    }

    .categoria-relatorio {
        padding: 2mm 0 !important;
    }

    .categoria-relatorio-header strong {
        font-size: 7.5pt !important;
    }

    .categoria-relatorio-nota strong {
        font-size: 7.5pt !important;
    }

    .categoria-relatorio-nota small {
        font-size: 6.5pt !important;
    }

    /* Texto do resultado compacto */
    .report-text-box {
        padding: 3mm 4mm !important;
    }

    .report-text-box p {
        font-size: 7.2pt !important;
        line-height: 1.35 !important;
    }
}