/* reports.css - Estilos premium para reportes */

.reports-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem 0;
    background: #2c3e50;
    border-radius: var(--radius-lg);
    color: white;
    border-left: 4px solid #3498db;
}

.reports-header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2.5rem;
    font-weight: 700;
}

.reports-header .subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 1.1rem;
}

/* Selector de Reportes */
.report-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.report-tab {
    flex: 1;
    max-width: 280px;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.report-tab:hover {
    transform: translateY(-4px);
    border-color: #3498db;
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
    background: rgba(52, 152, 219, 0.1);
}

.report-tab.active {
    background: #3498db;
    border-color: #3498db;
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.4);
    color: white;
}

.report-tab .tab-icon {
    font-size: 2.5rem;
}

.report-tab .tab-label {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Filtros */
.filters-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.filter-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 1.5rem;
    align-items: end;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.filter-actions {
    display: flex;
    gap: 1rem;
}

/* Summary Cards */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.summary-card-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.summary-card-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.summary-card-value.positive {
    color: var(--success);
}

.summary-card-value.negative {
    color: var(--error);
}

.summary-card-value.neutral {
    color: var(--primary);
}

.summary-card-change {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Tabla de Datos */
.data-table-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.data-table-card .card-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: #34495e;
}

.data-table-card .card-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead th {
    background: #34495e;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #ecf0f1;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
}

.data-table tbody td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table tbody tr {
    transition: background-color 0.2s ease;
}

.data-table tbody tr:hover {
    background: rgba(52, 152, 219, 0.08);
}

.data-table tfoot td {
    padding: 1rem;
    font-weight: 700;
    background: #2c3e50;
    color: #ecf0f1;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
}

.data-table-card .card-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #ecf0f1;
}

.data-table .text-right {
    text-align: right;
}

.data-table .text-center {
    text-align: center;
}

/* Estado Vacío */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state .empty-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.empty-state p {
    font-size: 1rem;
    opacity: 0.8;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay .spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-overlay p {
    margin-top: 1rem;
    color: white;
    font-size: 1.1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 1200px) {
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .filter-row {
        grid-template-columns: 1fr;
    }

    .filter-actions {
        flex-direction: column;
    }

    .report-selector {
        flex-direction: column;
    }

    .report-tab {
        max-width: 100%;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.report-results {
    animation: fadeInUp 0.5s ease-out;
}

.summary-card {
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
}

.summary-card:nth-child(1) {
    animation-delay: 0.1s;
}

.summary-card:nth-child(2) {
    animation-delay: 0.15s;
}

.summary-card:nth-child(3) {
    animation-delay: 0.2s;
}

.summary-card:nth-child(4) {
    animation-delay: 0.25s;
}

.summary-card:nth-child(5) {
    animation-delay: 0.3s;
}

.summary-card:nth-child(6) {
    animation-delay: 0.35s;
}
