/* ============================================================
   SIMULADOR DE METAS FINANCEIRAS
   Estilos exclusivos da ferramenta
   ============================================================ */


/* ============================================================
   ÁREA PRINCIPAL
   ============================================================ */

.meta-tool {
    display: flex;
    flex-direction: column;
    gap: 28px;
}


/* ============================================================
   ORIENTAÇÃO
   ============================================================ */

.goal-info-card {
    padding: 30px;
}

.goal-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-top: 26px;
}

.goal-info-item {
    display: flex;
    gap: 16px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
}

.goal-info-icon {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #eff6ff;
    font-size: 21px;
}

.goal-info-item h3 {
    margin: 0 0 7px;
    color: #0f172a;
    font-size: 16px;
}

.goal-info-item p {
    margin: 0;
    color: #64748b;
    line-height: 1.65;
    font-size: 14px;
}

.goal-tip {
    margin-top: 24px;
    padding: 16px 18px;
    border-left: 4px solid #2563eb;
    border-radius: 8px;
    background: #eff6ff;
    color: #334155;
    line-height: 1.6;
}

.goal-tip strong {
    color: #1e3a8a;
}


/* ============================================================
   CARTÕES DO SIMULADOR
   ============================================================ */

.sim-card {
    padding: 30px;
}


/* ============================================================
   SELETOR DE MODO
   ============================================================ */

.mode-selector {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 26px 0;
}

.mode-option {
    position: relative;
}

.mode-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mode-option label {
    display: block;
    padding: 15px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    color: #334155;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.mode-option label:hover {
    border-color: #93c5fd;
    background: #f8fbff;
}

.mode-option input:checked + label {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.08);
}


/* ============================================================
   FORMULÁRIO
   ============================================================ */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    margin-bottom: 8px;
    color: #1e293b;
    font-weight: 600;
}

.input-group input,
.input-group select {
    width: 100%;
}

.input-help {
    margin-top: 7px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}


/* ============================================================
   RESULTADO
   ============================================================ */

.result-highlight {
    margin-top: 24px;
    padding: 28px;
    border-radius: 14px;
    background: #eff6ff;
    text-align: center;
}

.result-label {
    display: block;
    margin-bottom: 8px;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
}

.result-value {
    display: block;
    color: #1d4ed8;
    font-size: clamp(30px, 5vw, 44px);
    line-height: 1.15;
}

.result-description {
    max-width: 760px;
    margin: 12px auto 0;
    color: #475569;
    line-height: 1.6;
}

.summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.summary-item {
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
}

.summary-item span {
    display: block;
    margin-bottom: 7px;
    color: #64748b;
    font-size: 13px;
}

.summary-item strong {
    color: #0f172a;
    font-size: 17px;
}


/* ============================================================
   GRÁFICO
   ============================================================ */

.chart-card {
    padding: 30px;
}

.chart-wrapper {
    position: relative;
    width: 100%;
    height: 360px;
    margin-top: 24px;
}

.chart-wrapper canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.chart-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 16px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 13px;
}

.legend-line {
    width: 28px;
    height: 3px;
    display: inline-block;
    border-radius: 999px;
    background: #222222;
}

.legend-line.secondary {
    height: 2px;
    background: #888888;
    border-top: 2px dashed #888888;
}


/* ============================================================
   TABELAS
   ============================================================ */

.scenarios-card,
.evolution-card {
    padding: 30px;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-top: 24px;
}

.scenario-table,
.evolution-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

.scenario-table th,
.scenario-table td,
.evolution-table th,
.evolution-table td {
    padding: 13px 14px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.scenario-table th,
.evolution-table th {
    background: #f8fafc;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.scenario-table td,
.evolution-table td {
    color: #475569;
    font-size: 14px;
}

.scenario-table tbody tr:hover,
.evolution-table tbody tr:hover {
    background: #f8fafc;
}


/* ============================================================
   INTERPRETAÇÃO
   ============================================================ */

.interpretation-card {
    padding: 30px;
}

.interpretation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 26px;
}

.interpretation-item {
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
}

.interpretation-item h3 {
    margin: 0 0 9px;
    color: #0f172a;
    font-size: 16px;
}

.interpretation-item p {
    margin: 0;
    color: #64748b;
    line-height: 1.65;
    font-size: 14px;
}


/* ============================================================
   AVISO FINANCEIRO
   ============================================================ */

.legal-notice {
    margin-top: 26px;
    padding: 17px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    color: #64748b;
    font-size: 13px;
    line-height: 1.65;
}

.legal-notice strong {
    color: #334155;
}


/* ============================================================
   RESPONSIVIDADE
   ============================================================ */

@media (max-width: 850px) {

    .goal-info-grid,
    .interpretation-grid {
        grid-template-columns: 1fr;
    }

    .summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 650px) {

    .goal-info-card,
    .sim-card,
    .chart-card,
    .scenarios-card,
    .evolution-card,
    .interpretation-card {
        padding: 22px;
    }

    .mode-selector,
    .form-grid,
    .summary {
        grid-template-columns: 1fr;
    }

    .goal-info-item {
        padding: 16px;
    }

    .chart-wrapper {
        height: 280px;
    }

    .chart-legend {
        justify-content: flex-start;
        gap: 14px;
    }

}


/* ============================================================
   IMPRESSÃO
   ============================================================ */

@media print {

    .mode-selector,
    .actions,
    .ad-container,
    .goal-info-card,
    .chart-legend {
        display: none !important;
    }

    .chart-wrapper {
        height: 300px;
    }

    .section-card {
        box-shadow: none !important;
    }

}