@import url('https://fonts.googleapis.com/css?family=Titillium Web');

/* assets/css/styles.css */
:root {
    --primary-color: #549db4;
    --primaryaltern-color: #306372;
    --secondary-color: #fd1100b0;
    --secondaryaltern-color: #b61105b0;
    --accent-color: #ffffff;
    --info-color: #0084ff;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --black: #000;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --border-radius: 0.5rem;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-image: url('../../../assets/img/hero-bg-light.webp');
    font-family: 'Titillium Web', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--gray-800);
    line-height: 1.6;

    background-size: cover;

    /* Centra la imagen */
    background-position: center center;

    /* Evita que la imagen se repita */
    background-repeat: no-repeat;

    /* Fija la imagen para que no se mueva al hacer scroll */
    background-attachment: fixed;

    /* Asegura que el fondo cubra todo el viewport */
    min-height: 100vh;

}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    /* Capa blanca semitransparente */
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 90%;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
/* Reset y estilos base */

/* Header */
.header {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.842);
    backdrop-filter: blur(10px);
    padding: 10px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 1.7em;
    margin-bottom: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.13);
}

.header p {
    font-size: 0.9em;
    opacity: 0.9;
}

/* Cards */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.card-primary { color: #3498db; }
.card-success { color: #2ecc71; }
.card-info { color: #9b59b6; }
.card-warning { color: #f39c12; }

.card-icon {
    font-size: 3em;
    opacity: 0.8;
}

.card-content h3 {
    font-size: 1.1em;
    margin-bottom: 5px;
    color: #666;
}

.card-number {
    font-size: 2.5em;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.card-content p {
    color: #999;
    font-size: 0.9em;
}

/* Filtros */
.filters-section {
    margin-bottom: 30px;
}

.filters-container {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-weight: 600;
    color: #555;
    font-size: 0.9em;
}

.filter-group select {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9em;
    min-width: 200px;
    transition: border-color 0.3s ease;
}

.filter-group select:focus {
    border-color: #3498db;
    outline: none;
}

.btn-filtrar {
    padding: 12px 25px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.3s ease;
    height: fit-content;
}

.btn-filtrar:hover {
    transform: translateY(-2px);
}

/* Charts */
.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.chart-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.chart-card.full-width {
    grid-column: 1 / -1;
}

.chart-header {
    padding: 20px 25px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-bottom: 1px solid #dee2e6;
}

.chart-header h3 {
    font-size: 0.8em;
    color: #495057;
    font-weight: normal;
}

.chart-content {
    padding: 25px;
    height: 400px;
    position: relative;
}

.chart-content-large {
    height: 600px;
}

/* Section Header */
.section-header {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
    text-align: center;
}

.section-header h2 {
    font-size: 1.5em;
    color: #495057;
    margin-bottom: 8px;
}

.section-header p {
    color: #6c757d;
    font-size: 1em;
    margin: 0;
}

/* Grid Container para gráficos pequeños */
.charts-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card-small {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chart-card-small:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.chart-header-small i{
    font-size: 1.3em;
}

.chart-header-small {
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-header-small h3 {
    font-size: 1.2em;
    margin: 0;
    font-weight: 500;
}

.chart-header-small h4 {
    font-size: 0.95em;
    margin: 0;
    font-weight: 500;
}

.chart-header-small i {
    margin-right: 8px;
    opacity: 0.9;
}

.chart-content-small {
    padding: 20px;
    height: 280px;
    position: relative;
}

/* Responsive ajustes para grid */
@media (max-width: 1200px) {
    .charts-grid-container {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .charts-grid-container {
        grid-template-columns: 1fr;
    }
    
    .chart-content-small {
        height: 250px;
    }
}

/* Tabla */
.table-section {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

.table-header {
    padding: 20px 25px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-header h3 {
    font-size: 1.2em;
    color: #495057;
}

.btn-export {
    padding: 10px 20px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.3s ease;
}

.btn-export:hover {
    transform: translateY(-2px);
}

.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: #f8f9fa;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    position: sticky;
    top: 0;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
}

.data-table tr:hover {
    background: #f8f9fa;
}

/* Sección de items */
.items-section {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.items-header {
    padding: 20px 25px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.items-header h3 {
    font-size: 1.2em;
    color: #495057;
}

.select-aspecto {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9em;
    min-width: 250px;
}

.items-chart {
    padding: 25px;
    height: 500px;
    position: relative;
}

/* Loading */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-overlay.hidden {
    display: none;
}

.spinner {
    text-align: center;
    color: white;
}

.spinner i {
    font-size: 3em;
    margin-bottom: 20px;
}

.spinner p {
    font-size: 1.2em;
}

/* Badges de niveles */
.badge {
    display: flex;
    width: 60px;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 0.8em;
    font-weight: normal;
    justify-content: center;
}

.badge-pre-inicio {
    background: #dc354694;
    color: #000;
}

.badge-inicio {
    background: #fd7d1494;
    color: #000;
}

.badge-proceso {
    background: #ffc10798;
    color: #000;
}

.badge-logrado {
    background: #28a74698;
    color: #000;
}

.badge-si {
    background: #28a745;
    color: white;
}

.badge-mejora-positiva {
    background: #28a745;
    color: white;
}

.badge-mejora-negativa {
    background: #dc3545;
    color: white;
}

.badge-mejora-neutral {
    background: #6c757d;
    color: white;
}

/* Progress bars */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 5px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    transition: width 0.6s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 1.8em;
    }
    
    .cards-container {
        grid-template-columns: 1fr;
    }
    
    .charts-container {
        grid-template-columns: 1fr;
    }
    
    .filters-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group select {
        min-width: 100%;
    }
    
    .table-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .items-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
}
/* Botón de regreso */
.back-button {
    position: fixed;

    padding: 0;
    width: 1.5em;
    height: 1.5em;
    bottom: 5rem;
    right: 2rem;
    background-color: var(--primaryaltern-color);
    color: white;
    font-size: 2rem;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(37, 99, 235, 0.3);
    transition: all 0.3s ease;
    z-index: 100;
}

.back-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.4);

}