/**
 * Estilos específicos para el módulo de Indicadores Productivos
 * Ubicación: /modules/productivos/assets/css/productivos.css
 */

:root {
    --productivo-primary: #2c3e50;
    --productivo-secondary: #3498db;
    --productivo-success: #27ae60;
    --productivo-warning: #f39c12;
    --productivo-danger: #e74c3c;
    --productivo-info: #16a085;
}

/* 
 * Nota: El espaciado lateral se maneja con la clase px-4 
 * de Bootstrap en el HTML, no aquí en el CSS 
 */

/* Header específico del módulo */
.dashboard-header {
    background: linear-gradient(135deg, #f39c12, #d68910);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.dashboard-header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
}

.dashboard-header p {
    font-size: 1rem;
    opacity: 0.9;
}

/* KPI Cards */
.kpi-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
    border-left: 4px solid;
}

.kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.kpi-card.border-primary { border-left-color: var(--productivo-primary); }
.kpi-card.border-success { border-left-color: var(--productivo-success); }
.kpi-card.border-info { border-left-color: var(--productivo-info); }
.kpi-card.border-warning { border-left-color: var(--productivo-warning); }
.kpi-card.border-danger { border-left-color: var(--productivo-danger); }

.kpi-number {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.kpi-card small {
    font-size: 0.85rem;
}

/* Chart Containers */
.chart-container {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    transition: box-shadow 0.3s ease;
    height: 100%;
}

.chart-container:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.chart-container h5 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--productivo-primary);
    border-bottom: 2px solid var(--productivo-secondary);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* Section Titles */
.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--productivo-primary);
    border-left: 4px solid var(--productivo-secondary);
    padding-left: 1rem;
    margin-bottom: 1.5rem;
}

/* Footer */
.footer-responsive {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}

.footer-responsive a {
    color: #90EE90;
    text-decoration: none;
    font-weight: bold;
}

.footer-responsive a:hover {
    text-decoration: underline;
}

/* Canvas responsiveness */
canvas {
    max-height: 400px !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dashboard-header h1 {
        font-size: 1.5rem;
    }
    
    .dashboard-header p {
        font-size: 0.9rem;
    }
    
    .kpi-number {
        font-size: 1.5rem;
    }
    
    .kpi-card {
        padding: 1rem;
    }
    
    .chart-container {
        padding: 1rem;
    }
    
    canvas {
        max-height: 300px !important;
    }
}

/* Loading states */
.chart-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    color: #6c757d;
}

.chart-loading i {
    font-size: 2rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Empty state */
.chart-empty {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    color: #6c757d;
    text-align: center;
}

.chart-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Button customization */
.btn-light {
    background-color: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    transition: all 0.3s ease;
}

.btn-light:hover {
    background-color: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
    color: white;
    transform: translateY(-2px);
}

/* Tooltip customization for charts */
.chartjs-tooltip {
    opacity: 1 !important;
    background: rgba(0, 0, 0, 0.8) !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
}

/* Print styles */
@media print {
    .dashboard-header,
    .footer-responsive,
    .btn {
        display: none;
    }
    
    .chart-container {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
