/* ============================================
   STATISTICS - Página de Estatísticas
   Galinheiro Pinheiro
   ============================================ */

/* Grid Responsivo */
.grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

/* Cards de Estatísticas */
.stat-card {
    background: #ffffff;
    border-radius: 1rem;
    padding: 1.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    font-size: 2.75rem;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.625rem;
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.375rem;
}

.stat-subtext {
    font-size: 0.8125rem;
    color: #9ca3af;
}

/* Variantes de Cores dos Cards */
.stat-card-blue {
    border-left: 4px solid #3b82f6;
}

.stat-card-blue .stat-value {
    color: #1e40af;
}

.stat-card-pink {
    border-left: 4px solid #ec4899;
}

.stat-card-pink .stat-value {
    color: #be123c;
}

.stat-card-red {
    border-left: 4px solid #ef4444;
}

.stat-card-red .stat-value {
    color: #991b1b;
}

.stat-card-green {
    border-left: 4px solid #10b981;
}

.stat-card-green .stat-value {
    color: #065f46;
}

/* Cards de Progresso (Barras) */
.progress-card {
    background: #ffffff;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    margin-bottom: 1.5rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.progress-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.25rem;
}

.progress-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.375rem;
}

.progress-badge {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.progress-badge-verde {
    background-color: #d1fae5;
    color: #065f46;
}

.progress-badge-amarelo {
    background-color: #fef3c7;
    color: #92400e;
}

.progress-badge-vermelho {
    background-color: #fee2e2;
    color: #991b1b;
}

.progress-badge-azul {
    background-color: #dbeafe;
    color: #1e40af;
}

.progress-badge-verde-postura {
    background-color: #d1fae5;
    color: #065f46;
}

/* Barras de Progresso */
.progress-bar-container {
    height: 2rem;
    background-color: #e5e7eb;
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 1rem;
    position: relative;
}

.progress-bar {
    height: 100%;
    transition: width 0.8s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #ffffff;
    border-radius: 1rem;
}

/* Gradientes de Cor para Frangos (Verde → Amarelo → Vermelho) */
.progress-bar-verde {
    background: linear-gradient(90deg, #10b981 0%, #22c55e 100%);
}

.progress-bar-amarelo {
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
}

.progress-bar-vermelho {
    background: linear-gradient(90deg, #f97316 0%, #ef4444 100%);
}

/* Gradiente de Cor para Poedeiras (Azul → Verde) */
.progress-bar-azul {
    background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
}

.progress-bar-verde-postura {
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
}

.progress-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #6b7280;
}

.progress-detail {
    font-weight: 500;
}

/* Cards de Faixa Etária */
.age-card {
    background: #ffffff;
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 2px solid #e5e7eb;
    transition: border-color 0.2s ease;
}

.age-card:hover {
    border-color: #8b5cf6;
}

.age-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.age-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #374151;
}

.age-count {
    font-size: 1.5rem;
    font-weight: 800;
    color: #8b5cf6;
}

.age-lotes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
}

.age-lote-tag {
    background-color: #f3f4f6;
    color: #4b5563;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
}

/* Cards de Análise de Custos */
.cost-card {
    background: #ffffff;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 2px solid #e5e7eb;
}

.cost-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.5rem;
}

.cost-breakdown {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cost-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: #f9fafb;
    border-radius: 0.625rem;
}

.cost-item.cost-total {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 2px solid #93c5fd;
    font-weight: 600;
    padding: 1.125rem 1rem;
}

.cost-item.cost-average {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 2px solid #6ee7b7;
    font-weight: 700;
    padding: 1.125rem 1rem;
}

.cost-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e40af;
}

.cost-item.cost-average .cost-value {
    color: #065f46;
    font-size: 1.375rem;
}

/* === HISTÓRICO === */

/* Cards Históricos */
.history-card {
    background: #ffffff;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.history-icon {
    font-size: 3rem;
    flex-shrink: 0;
}

.history-content {
    flex: 1;
}

.history-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.history-value {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.history-subtext {
    font-size: 0.875rem;
    color: #9ca3af;
}

.history-card-blue {
    border-left: 6px solid #3b82f6;
}

.history-card-blue .history-value {
    color: #1e40af;
}

.history-card-pink {
    border-left: 6px solid #ec4899;
}

.history-card-pink .history-value {
    color: #be123c;
}

.history-card-red {
    border-left: 6px solid #ef4444;
}

.history-card-red .history-value {
    color: #991b1b;
}

/* Cards Financeiros */
.financial-card {
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    border-radius: 0.75rem;
    padding: 1.25rem;
    border: 2px solid #e5e7eb;
    text-align: center;
}

.financial-card-total {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    border-color: #7c3aed;
}

.financial-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.financial-card-total .financial-label {
    color: #ffffff;
}

.financial-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #111827;
}

.financial-card-total .financial-value {
    color: #ffffff;
    font-size: 1.75rem;
}

/* Gráfico de Pizza Visual */
.pie-chart-container {
    background: #ffffff;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pie-visual {
    display: flex;
    height: 3rem;
    border-radius: 0.75rem;
    overflow: hidden;
}

.pie-item {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: flex 0.3s ease;
}

.pie-item:hover {
    flex-grow: 1.2 !important;
}

.pie-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.pie-item-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.pie-item-orange {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.pie-item-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* Info Box */
.info-box {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    border: 2px solid #c4b5fd;
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
}

.info-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.info-content {
    flex: 1;
}

.info-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #5b21b6;
    margin-bottom: 0.5rem;
}

.info-text {
    font-size: 0.875rem;
    color: #6b21a8;
    line-height: 1.6;
}

/* Responsividade */
@media (max-width: 1024px) {
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .grid-cols-4,
    .grid-cols-3,
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .progress-header {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .progress-badge {
        align-self: flex-start;
    }
}

