/* ============================================
   RELATÓRIOS - ANÁLISES E EXPORTAÇÕES
   ============================================ */

.relatorios-page {
    padding: 0;
}

/* ============================================
   HEADER
   ============================================ */
.relatorios-header {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.relatorios-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 8px;
}

.relatorios-header p {
    font-size: 14px;
    color: #666;
}

/* ============================================
   FILTROS
   ============================================ */
.relatorios-filtros {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.filtros-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

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

.filtro-label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
}

.filtro-input {
    padding: 10px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filtro-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.filtros-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.btn-secondary:hover {
    background: #f0f7ff;
}

/* ============================================
   CARDS DE RELATÓRIOS
   ============================================ */
.relatorios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.relatorio-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #f0f0f0;
}

.relatorio-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.relatorio-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}

.relatorio-card-icon.vendas {
    background: linear-gradient(135deg, var(--primary), #0056b3);
    color: white;
}

.relatorio-card-icon.produtos {
    background: linear-gradient(135deg, #34C759, #28a745);
    color: white;
}

.relatorio-card-icon.clientes {
    background: linear-gradient(135deg, #FF9500, #e67e00);
    color: white;
}

.relatorio-card-icon.financeiro {
    background: linear-gradient(135deg, #AF52DE, #8e44ad);
    color: white;
}

.relatorio-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 8px;
}

.relatorio-card p {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.relatorio-card-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.relatorio-card-meta {
    font-size: 12px;
    color: #999;
}

.relatorio-card-action {
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ============================================
   TABELA DE DADOS
   ============================================ */
.relatorios-tabela-container {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow-x: auto;
}

.relatorios-tabela-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.relatorios-tabela-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1d1d1f;
}

.btn-exportar {
    background: #34C759;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.btn-exportar:hover {
    background: #28a745;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 199, 89, 0.3);
}

.relatorios-tabela {
    width: 100%;
    border-collapse: collapse;
}

.relatorios-tabela thead {
    background: #f9f9f9;
}

.relatorios-tabela th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e0e0e0;
}

.relatorios-tabela td {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #1d1d1f;
}

.relatorios-tabela tbody tr:hover {
    background: #f9f9f9;
}

.relatorios-tabela tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================
   GRÁFICOS
   ============================================ */
.grafico-container {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
}

.grafico-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.grafico-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1d1d1f;
}

.grafico-canvas {
    min-height: 300px;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 16px;
    border: 2px dashed #e0e0e0;
}

.empty-state i {
    font-size: 64px;
    color: #ccc;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 20px;
    color: #555;
    margin-bottom: 12px;
}

.empty-state p {
    font-size: 14px;
    color: #999;
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */
@media (max-width: 768px) {
    .filtros-row {
        grid-template-columns: 1fr;
    }

    .filtros-actions {
        flex-direction: column;
    }

    .relatorios-grid {
        grid-template-columns: 1fr;
    }

    .relatorios-tabela-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .btn-exportar {
        width: 100%;
        justify-content: center;
    }
}
