/* Responsividade para telas de até 1000px (Tablets e Celulares) */

@media screen and (max-width: 1200px) {
  
    html, body {
        overflow-x: hidden;
        width: 100%;
    }

    header {
        width: 100% !important;
        left: 0;
        right: 0;
        box-sizing: border-box; /* Garante que o padding não aumente o tamanho */
    }

    #cabecalho-principal {
        font-size: 0.7rem; /* Aumentado para leitura no celular */
    }

    img {
        width: 2.5rem;
    }

    form {
        padding-top: 5px; /* Mais espaço para o cabeçalho fixo */
    }
    legend {
        font-size: 0.9rem;
    }

    #a-dados-servidor, #a-nivel, .a-quesito, .a-tabela, .a-infoc, .a-assinaturas {
        width: 95% !important;
        margin: 0rem !important;
        box-sizing: border-box;
    }
    .b-dados-servidor{
      width: 100%;
    }

    /* 2. Ajuste dos Campos de Dados (Matrícula, Nome, Cargo) */
    .linha-label-input, .d-label-input {
        flex-direction: column !important;
        align-items: flex-start !important;
        width: 100% !important;
    }

    input[type="text"], input[type="date"], select, textarea {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    .linha-label-input label {
        width: 100% !important;
    }
   .linha-label-input label {
        width: 100% !important;
        margin-bottom: 0.1rem;
    }

    #input-matriculaservidor, #input-nomeservidor, #cargoservidor, #secretaria, #lotacaoservidor, #dataexercicioservidor, #input-nomechefe, #input-matriculachefe, #input-cargochefe {
        width: 100% !important;
        height: 40px; /* Melhora o toque */
    }
    #dataexercicioservidor {
        text-align: center;
    }

    /* 3. Blocos de Avaliação e Datas */
    .b-avaliacao, .b-nivel, .b-infoc {
        width: 100%;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    #avaliacao-num50, #data-avaliacao {
        width: 100%;
    }
    #avaliacao-num, #dataavaliacao{
        padding: 0.5rem;
        text-align: center;
        justify-content: center;
    }


    /* 4. Quesitos e Alternativas (O maior desafio no mobile) */
    .b-pergunta {
        flex-direction: column; /* Pergunta em cima, notas embaixo */
        align-items: flex-start;
        padding: 1rem;
        width: 95%;
    }

    .c-pergunta {
        width: 100%;
        min-height: auto;
        padding: 0 0 1rem 0;
        font-size: 0.9rem;
    }

    .c-alternativas {
        
        min-width: 100% !important;
        display: flex;
        justify-content: space-between;
    
    }

    .c-alternativas label {
        padding: 0.8rem 0; /* Aumenta a área de toque vertical */
        flex: 1; /* Faz todos os botões terem o mesmo tamanho */
        text-align: center;
    }
    .b-totalobtido {
  display: flex;
    background-color: royalblue;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    padding: 0.5rem;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 0.3rem;
    width: 50%;
    justify-content: center;
}
    /* 5. Tabela de Resumo (Torna a tabela rolável lateralmente) */
    .b-tabela {
        width: 100%;
        overflow-x: auto; /* Adiciona scroll se a tabela não couber */
        -webkit-overflow-scrolling: touch;
        padding: 0;
    }

    .tabela-pontuacao {
        font-size: 0.85rem;
    }

    /* 6. Assinaturas e Carimbos */
    .c-bloco-assinatura {
        width: 100%;
    }

    #input-nomechefe, #input-cargochefe, #input-matriculachefe {
        width: 100% !important;
    }

    /* 7. Rodapé */
    .rodape-container {
        flex-direction: column;
        text-align: center;
    }

    /* 8. Botão de Imprimir */
    button.botao {
        width: 90%;
        font-size: 1.5rem;
    }

    /* Ajuste para a conclusão Apto/Inapto */
    .b-apto-inapto label {
        display: block; /* Um embaixo do outro para não clicar errado */
        margin-bottom: 0.5rem;
        width: 100%;
        text-align: center;
    }
}