/* CALCULADORA FINANCEIRA */

:root {
    --azul-escuro: #0c1e35;
    --azul: #176b9a;
    --verde: #16835c;
    --fundo: #f1f5f9;
    --branco: #ffffff;
    --texto: #263445;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--fundo);
    color: var(--texto);
    line-height: 1.6;
}

header {
    background: var(--azul-escuro);
    color: white;
    text-align: center;
    padding: 38px 20px;
}

header h1 {
    margin: 0;
    font-size: 2rem;
}

header p {
    color: #c2d6e8;
}

main {
    width: min(1100px, 94%);
    margin: 35px auto;
}

section {
    background: var(--branco);
    padding: 28px;
    margin-bottom: 25px;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.06);
}

h2, h3 {
    color: var(--azul-escuro);
}

form {
    display: grid;
    gap: 12px;
    margin-top: 25px;
}

label {
    font-weight: 600;
}

input, select {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
}

input:focus, select:focus {
    outline: 2px solid var(--azul);
    outline-offset: 1px;
}

button {
    padding: 13px 18px;
    border: none;
    border-radius: 8px;
    background: var(--azul);
    color: white;
    font-weight: 600;
    cursor: pointer;
}

button:hover {
    filter: brightness(1.1);
}

fieldset {
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 18px;
    min-width: 0;
}

legend {
    font-weight: bold;
    color: var(--azul-escuro);
}

.deposito-extra {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 12px;
}

.deposito-extra label {
    display: grid;
    gap: 6px;
}

.remover-deposito {
    background: #b42332;
}

#resultado-economias {
    margin-top: 28px;
}

#resultado-economias > p {
    padding: 10px 14px;
    background: #f4f8fc;
    border-left: 4px solid var(--azul);
    border-radius: 6px;
}

#resultado-economias > p:nth-of-type(4) {
    border-left-color: var(--verde);
}

#resultado-economias > section {
    margin-top: 28px;
    box-shadow: none;
    padding: 0;
}

.botoes-evolucao {
    display: flex;
    gap: 12px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.tabela-container {
    overflow-x: auto;
    border: 1px solid #dce5ee;
    border-radius: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

th {
    background: var(--azul-escuro);
    color: white;
    padding: 14px;
    text-align: right;
}

th:first-child {
    text-align: center;
}

td {
    padding: 12px 14px;
    border-bottom: 1px solid #e2e8f0;
    text-align: right;
    white-space: nowrap;
}

td:first-child {
    text-align: center;
    font-weight: bold;
}

tbody tr:nth-child(even) {
    background: #f4f8fc;
}

tbody tr:hover {
    background: #e8f3fb;
}

footer {
    text-align: center;
    padding: 25px;
    background: var(--azul-escuro);
    color: white;
}

small {
    color: #64748b;
}

@media (max-width: 600px) {
    header h1 {
        font-size: 1.5rem;
    }

    section {
        padding: 18px;
    }

    .deposito-extra {
        grid-template-columns: 1fr;
    }

    .botoes-evolucao button {
        width: 100%;
    }
}
/* Alternância mensal e anual */

.botoes-evolucao button {
    background: #e8eff5;
    color: #0c1e35;
    border: 2px solid transparent;
    transition: background 0.2s, color 0.2s;
}

.botoes-evolucao button.ativo {
    background: #176b9a;
    color: white;
    border-color: #0c1e35;
}

.botoes-evolucao button:focus-visible {
    outline: 3px solid #16835c;
    outline-offset: 3px;
}
/* Gráfico financeiro */

.grafico-container {
    position: relative;
    width: 100%;
    height: 380px;
    margin-top: 20px;
}

@media (max-width: 600px) {
    .grafico-container {
        height: 300px;
    }
}
/* Campos dos depósitos adicionais */

.deposito-extra {
    grid-template-columns: 1fr 1fr 1fr auto;
}

@media (max-width: 700px) {
    .deposito-extra {
        grid-template-columns: 1fr;
    }
}

/* Rodapé COCARA - Etapa 153 */

#rodape-cocara {
    margin-top: 48px;
    padding: 32px 20px;
    background: #fff5df;
    border-top: 4px solid #e9ad35;
    text-align: center;
    color: #064d7a;
}

#rodape-cocara .logo-rodape {
    display: block;
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin: 0 auto 14px;
    border-radius: 50%;
}

#rodape-cocara p {
    margin: 0 0 10px;
    font-size: 0.95rem;
    font-weight: 600;
}

#rodape-cocara a {
    color: #064d7a;
    font-size: 0.95rem;
    text-decoration: none;
    overflow-wrap: anywhere;
}

#rodape-cocara a:hover,
#rodape-cocara a:focus-visible {
    text-decoration: underline;
}

@media (max-width: 600px) {
    #rodape-cocara {
        padding: 24px 12px;
    }

    #rodape-cocara .logo-rodape {
        width: 100px;
        height: 100px;
    }
}
