/* ==========================================================================
   2. DESTAQUE MODAL ENTRADA
   ========================================================================== */
#modalTermoInicial .modal-header {
    border-bottom: 2px solid #e0a800;
}

#modalTermoInicial .modal-content {
    box-shadow: 0 0 30px rgba(0,0,0,0.3);
}

.shake-animation {
    animation: shake 0.5s;
}

@keyframes shake {
    0%   { transform: translateX(0); }
    25%  { transform: translateX(-5px); }
    50%  { transform: translateX(5px); }
    75%  { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

/* ==========================================================================
   3. CONTAINER PRINCIPAL E CABEÇALHO
   ========================================================================== */

.text-muted{
    font-size: 1rem;
    color: rgb(0, 0, 0) !important;
}
.small{
    font-size: 1.04rem;
}
.calculadora-wrapper {
    clear: both;
    max-width: 800px;
    margin: 20px auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    padding: 0;
}

.topo-aviso {
    text-align: center;
    background-color: #4a75a1;
    padding: 10px 15px;
    font-weight: bold;
    font-size: 1.3rem;
    color: #f3f3f3;
}

.calc-header {
    background-color: #003366;
    color: #fff;
    padding: 15px;
    font-weight: bold;
    font-size: 1.1rem;
    text-align: center;
}

/* ==========================================================================
   3.5. CORPO DO FORMULÁRIO E INPUTS
   ========================================================================== */

.caixa-de-texto{
   
    border: 1px solid red;
}

/* ==========================================================================
   4. CORPO DO FORMULÁRIO E INPUTS
   ========================================================================== */
.form-body {
    padding: 20px;
    background-color: #f8fafc;
}

.instrucao {
    font-size: 0.95rem;
    color: #d9534f;
    margin-bottom: 20px;
    text-align: right;
    font-weight: bold;
}

.linha-input {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 15px;
}

.linha-input label {
    flex: 0 0 200px;
    font-weight: bold;
    text-align: right;
    margin-right: 15px;
    font-size: 0.95rem;
}

.input-area {
    flex: 1;
    min-width: 200px;
}

.input-area input, 
.input-area select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* ==========================================================================
   5. CAIXA DE LANÇAMENTOS E IMPORTAÇÃO CSV
   ========================================================================== */
.lancamentos-box {
    background: #fff; 
    padding: 20px; 
    border: 1px solid #ddd; 
    border-radius: 8px; 
    margin-bottom: 20px;
}

.titulo-lancamentos {
    color: #003366; 
    font-size: 1.25rem; 
    margin-bottom: 15px; 
    border-bottom: 2px solid #4a75a1; 
    padding-bottom: 5px;
}

.btn-adicionar-lista {
    background: #003366; 
    border: none;
}

.import-section {
    background: #f8f9fa;
    border: 2px dashed #4a75a1;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.csv-input-estilo {
    font-size: 0.85rem;
}

.input-csv-oculto {
    display: none;
}

.tabela-comissoes-container {
    max-height: 250px; 
    overflow-y: auto;
}

/* ==========================================================================
   6. PAINEL DE RESULTADOS E TOTAL GERAL
   ========================================================================== */
.resultado-box {
    display: none;
    margin-top: 30px;
}

.resultado-titulo {
    background: #003366;
    color: #fff;
    padding: 10px;
    font-weight: bold;
    font-size: 1.3rem;
}

.tabela-resultados {
    width: 100%;
    border-collapse: collapse;
}

.tabela-resultados td,
.tabela-resultados th {
    padding: 10px;
    border-bottom: 1px solid #eee;
    font-size: 1rem;
}

.tabela-resultados td:last-child,
.tabela-resultados th:last-child {
    text-align: right;
    font-weight: bold;
    font-size: 1rem;
    white-space: nowrap;
}

/* Cabeçalhos de linha (th scope="row") — alinhamento correto */
.tabela-resultados th[scope="row"] {
    text-align: left;
    font-weight: normal;
}

.divisor-calculado {
    background: #4a75a1;
    color: white;
    font-weight: bold;
    text-align: center !important;
}

.linha-final { background: #eee; font-size: 1.1rem; font-weight: bold; }

.linha-indenizacao {
    background-color: #e8f4fd;
    font-weight: bold;
    font-size: 0.95rem;
}

.linha-aviso {
    background-color: #f9f9f9;
    font-weight: bold;
    font-size: 1rem;
}

#resDozeAvos, #resAvisoPrevio {
    color: #2c3e50;
    font-size: 1.1em;
}

/* ==========================================================================
   6.5 ESTILIZAÇÃO DA LINHA TOTAL GERAL
   ========================================================================== */
.linha-total-geral {
    background-color: #eef2f7 !important;
    border-top: 2px solid #003366;
    transition: background-color 0.3s ease;
}

.linha-total-geral .titulo-total {
    font-weight: bold !important;
    color: #003366 !important;
    vertical-align: middle;
}

.linha-total-geral .valor-total {
    font-weight: bold !important;
    font-size: 1rem !important;
    color: #003366 !important;
    text-align: right;
    vertical-align: middle;
}

/* ==========================================================================
   7. MEMÓRIA DE CÁLCULO (EXTRATO DETALHADO)
   ========================================================================== */
.extrato-container {
    display: none;
    margin-top: 25px;
    border: 1px solid #ddd;
}

.extrato-titulo {
    background: #4a75a1;
    color: white;
    padding: 10px;
    font-weight: bold;
    font-size: 1.4rem;
}

.extrato-scroll {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* O div de scroll é focável para navegação por teclado (tabindex=0 no HTML) */
.extrato-scroll:focus-visible {
    outline: 2px solid #4a75a1;
    outline-offset: 2px;
}

.tabela-extrato {
    width: 100%;
    border-collapse: collapse;
    min-width: 300px;
}

.tabela-extrato th {
    background: #eee;
    position: sticky;
    top: 0;
    padding: 10px;
    border: 1px solid #ddd;
}

.tabela-extrato td {
    padding: 8px;
    border: 1px solid #ddd;
}

/* ==========================================================================
   8. RESUMO ANUAL E PAINÉIS ADICIONAIS
   ========================================================================== */
#painelAnual {
    margin-top: 30px;
    border: 1px solid;
    border-radius: 4px;
    padding: 10px;
    overflow: hidden;
}

#painelAnual h3 {
    background: #003366;
    color: white;
    margin: 0;
    padding: 12px;
    font-size: 1.1rem;
    text-align: center;
}

.tabela-anual {
    width: 100%;
    border-collapse: collapse;
}

.tabela-anual th {
    background: #4a75a1;
    color: white;
    padding: 10px;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.tabela-anual td {
    padding: 10px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.tabela-anual tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

.tabela-anual tfoot tr {
    background-color: #e8f4fd;
    font-weight: bold;
    color: #003366;
}

.tabela-anual tfoot td {
    padding: 12px;
    border-top: 2px solid #4a75a1;
    font-size: 1rem;
}

#totalIndenizacaoGeral { color: #d9534f; }

/* ==========================================================================
   9. RODAPÉ E BOTÕES DE AÇÃO
   ========================================================================== */
.btn-group-custom {
    padding: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    background: #fff;
}

button {
    padding: 10px 25px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

button:hover { filter: brightness(1.2); }

.btn-calc   { background: #003366; color: #fff; border: none; }
.btn-salvar { background: #02a108; color: #fff; border: none; }
.btn-voltar { background: #5e6770; color: #fff; border: none; }
.btn-excel  { background: #003366; color: #fff; border: none; }
.btn-pdf    { background: #003366; color: #fff; border: none; }

/* ==========================================================================
   10. AVISO LEGAL E TERMOS DE USO
   ========================================================================== */
.aviso-legal-box {
    margin-top: 20px;
    padding: 15px;
    border-top: 1px dashed #ccc;
    background-color: #eee;
    color: #cf0404;
    font-size: 0.9rem;
    text-align: justify;
}

.texto-urgente {
    color: #0b0a0a;
    font-weight: bold;
    margin-top: 5px;
}

.detalhes-termos {
    margin-top: 15px; 
    cursor: pointer; 
    color: #020202;
}

.conteudo-termos {
    padding: 10px; 
    font-size: 0.9em; 
    background: #f9f9f9; 
    border-radius: 5px;
}

/* ==========================================================================
   11. TOOLTIP DE AJUDA (MODELO CSV)
   ========================================================================== */
.modelo-helper {
    position: relative;
    display: inline-block;
    cursor: help;
    margin-top: 10px;
    font-size: 0.9em;
    color: #666;
}

/* Foco acessível no helper do modelo CSV */
.modelo-helper:focus-visible {
    outline: 2px solid #4a75a1;
    outline-offset: 3px;
    border-radius: 3px;
}

.destaque {
    color: #010508;
    text-decoration: underline;
    font-weight: bold;
}

.tooltip-imagem {
    display: none;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 2px solid #003366;
    padding: 5px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    z-index: 1000;
    width: 300px;
}

.tooltip-imagem img {
    width: 100%;
    height: auto;
    display: block;
}

.tooltip-imagem::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -10px;
    border-width: 10px;
    border-style: solid;
    border-color: #003366 transparent transparent transparent;
}

.modelo-helper:hover .tooltip-imagem,
.modelo-helper:focus .tooltip-imagem,
.modelo-helper:active .tooltip-imagem {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ==========================================================================
   12. RESPONSIVIDADE (MOBILE)
   ========================================================================== */
@media (max-width: 768px) {
    .calculadora-wrapper {
        margin: 10px;
        width: calc(100% - 20px);
    }

    .linha-input {
        flex-direction: column;
        align-items: stretch;
    }

    .linha-input label {
        flex: 0 0 100%;
        text-align: left;
        margin-right: 0;
        margin-bottom: 8px;
    }

    .input-area {
        min-width: 0;
        width: 100%;
    }

    .btn-group-custom {
        flex-direction: column;
    }

    button {
        width: 100%;
        margin: 0;
    }

    .tabela-anual th, .tabela-anual td {
        padding: 8px 4px;
        font-size: 0.85rem;
    }

    .tooltip-imagem {
        width: 280px;
        max-width: 90vw;
    }

    /* Painel de acessibilidade no mobile */
    #painelAcessibilidade {
        bottom: 16px;
        right: 16px;
    }

    .painel-acessibilidade-opcoes {
        width: 230px;
    }
}

/* ==========================================================================
   Estilização da Seta (Marcador)
   ========================================================================== */
.detalhes-calculo summary {
    cursor: pointer;
    outline: none;
    color: #003366;
    display: list-item;
}

.detalhes-calculo summary::marker {
    color: #000000;
    font-size: 1.1em;
}

.texto-explicativo {
    font-size: 0.85rem;
    color: #555;
    padding: 8px 0 8px 15px;
    line-height: 1.4;
    border-left: 2px solid #eee;
    margin-top: 5px;
}

/* ==========================================================================
   13. CONFIGURAÇÕES DE IMPRESSÃO
   ========================================================================== */
@media print {
    header, 
    footer, 
    .btn-group-custom, 
    .btn-calc, 
    .btn-voltar, 
    .btn-excel, 
    .btn-pdf,
    .lancamentos-box .row,
    #btnAdicionar,
    .instrucao,
    .linha-input,
    hr,
    #painelAcessibilidade,
    .skip-link {
        display: none !important;
    }

    .container, .calculadora-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
    }

    .table-responsive {
        overflow: visible !important;
    }

    table {
        border-collapse: collapse !important;
        width: 100% !important;
    }

    th, td {
        border: 1px solid #ddd !important;
        padding: 8px !important;
        color: #000 !important;
    }

    #painelResultado, #extratoMensal {
        display: block !important;
        margin-top: 20px !important;
    }

    .topo-aviso, .calc-header {
        color: #003366 !important;
        text-align: center !important;
        font-size: 1.5rem !important;
        margin-bottom: 20px !important;
    }

    tr {
        page-break-inside: avoid;
        
    }
}
/*