/* Estilos para gráficos e visualizações de dados */

.chart-wrapper {
    margin: 30px 0;
    padding: 20px;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--card-shadow);
}

.chart-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.chart-description {
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-bottom: 20px;
}

/* Gráfico de barras horizontal */
.bar-chart {
    width: 100%;
}

.bar-item {
    margin-bottom: 15px;
}

.bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.bar-name {
    font-weight: 500;
    color: var(--dark-color);
}

.bar-value {
    font-weight: 600;
    color: var(--dark-color);
}

.bar-container {
    height: 25px;
    background-color: #F3F4F6;
    border-radius: var(--border-radius-full);
    overflow: hidden;
    position: relative;
}

.bar-fill {
    height: 100%;
    border-radius: var(--border-radius-full);
    transition: width 1.5s ease;
}

.bar-fill-simples {
    background: var(--success-gradient);
}

.bar-fill-lucro {
    background: var(--warning-gradient);
}

.bar-fill-irpf {
    background: var(--primary-gradient);
}

/* Gráfico de pizza */
.pie-chart-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pie-chart {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: conic-gradient(
        #10B981 0% 33%,
        #F59E0B 33% 66%,
        #6366F1 66% 100%
    );
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.pie-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-right: 15px;
}

.legend-color {
    width: 15px;
    height: 15px;
    border-radius: 3px;
    margin-right: 8px;
}

.legend-color-simples {
    background: #10B981;
}

.legend-color-lucro {
    background: #F59E0B;
}

.legend-color-irpf {
    background: #6366F1;
}

.legend-text {
    font-size: 0.9rem;
    color: var(--dark-color);
}

/* Gráfico de linha */
.line-chart-container {
    height: 250px;
    position: relative;
    margin-top: 30px;
    padding-bottom: 20px;
}

.line-chart-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.grid-line {
    width: 100%;
    height: 1px;
    background-color: #E5E7EB;
}

.line-chart-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.line-chart-label {
    font-size: 0.8rem;
    color: var(--gray-color);
    text-align: center;
}

.line-chart-y-labels {
    position: absolute;
    left: -40px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.y-label {
    font-size: 0.8rem;
    color: var(--gray-color);
    transform: translateY(-50%);
}

/* Comparação visual de valores */
.comparison-visual {
    margin: 30px 0;
}

.comparison-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.comparison-item {
    margin-bottom: 20px;
}

.comparison-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.comparison-name {
    font-weight: 500;
    color: var(--dark-color);
}

.comparison-value {
    font-weight: 600;
    color: var(--dark-color);
}

.comparison-bar {
    height: 25px;
    background-color: #F3F4F6;
    border-radius: var(--border-radius-full);
    overflow: hidden;
    position: relative;
}

.comparison-fill {
    height: 100%;
    border-radius: var(--border-radius-full);
    transition: width 1.5s ease;
}

.comparison-fill-simples {
    background: var(--success-gradient);
}

.comparison-fill-lucro {
    background: var(--warning-gradient);
}

.comparison-fill-irpf {
    background: var(--primary-gradient);
}

/* Indicadores e métricas */
.metrics-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.metric-card {
    padding: 20px;
    background: white;
    border-radius: var(--border-radius-md);
    box-shadow: var(--card-shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.metric-icon {
    font-size: 2rem;
    margin-bottom: 15px;
}

.metric-icon-simples {
    color: #10B981;
}

.metric-icon-lucro {
    color: #F59E0B;
}

.metric-icon-irpf {
    color: #6366F1;
}

.metric-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.metric-label {
    font-size: 0.9rem;
    color: var(--gray-color);
}

/* Tabela de comparação detalhada */
.detailed-comparison {
    margin: 30px 0;
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.comparison-table th {
    background-color: #F9FAFB;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: var(--dark-color);
    border-bottom: 1px solid #E5E7EB;
}

.comparison-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #E5E7EB;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table tr:nth-child(even) {
    background-color: #F9FAFB;
}

.comparison-table .highlight {
    background-color: rgba(99, 102, 241, 0.1);
    font-weight: 500;
}

/* Responsividade para visualizações */
@media (max-width: 768px) {
    .metrics-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pie-chart {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 480px) {
    .metrics-container {
        grid-template-columns: 1fr;
    }
    
    .comparison-table {
        font-size: 0.85rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 10px;
    }
}
