:root {
            --primary: #00539c;
            --secondary: #04a0a8;
            --success: #48bb78;
            --danger: #f56565;
            --warning: #ed8936;
            --info: #4299e1;
            --gray: #718096;
            --gray-light: #f7fafc;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Inter', sans-serif;
            background: #f5f7fa;
            color: #2d3748;
            line-height: 1.6;
        }
        
        .container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 20px;
        }
        
        .header {
            background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
            color: white;
            padding: 30px;
            border-radius: 15px;
            margin-bottom: 30px;
            box-shadow: 0 10px 30px rgba(0,83,156,0.2);
        }
        
        .header h1 {
            font-size: 2.2em;
            margin-bottom: 10px;
            font-weight: 700;
        }
        
        .header p {
            opacity: 0.95;
            font-size: 1.1em;
        }
        
        .filters {
            background: white;
            padding: 25px;
            border-radius: 12px;
            margin-bottom: 25px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
        }
        
        .filters h3 {
            margin-bottom: 15px;
            color: #2d3748;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .filter-group {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            margin-bottom: 15px;
        }
        
        .filter-group select {
            padding: 10px 15px;
            border: 2px solid #e2e8f0;
            border-radius: 8px;
            font-size: 14px;
            transition: all 0.3s;
        }
        
        .filter-group select:focus {
            outline: none;
            border-color: var(--primary);
        }
        
        .btn {
            padding: 10px 25px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }
        
        .btn-primary {
            background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
            color: white;
        }
        
        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(0,83,156,0.3);
        }
        
        .btn-secondary {
            background: #e2e8f0;
            color: #2d3748;
        }
        
        .btn-export {
            background: var(--success);
            color: white;
            margin-left: 10px;
        }
        
        .no-data {
            text-align: center;
            padding: 50px;
            background: white;
            border-radius: 12px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
        }
        
        .no-data i {
            font-size: 4em;
            color: var(--gray);
            margin-bottom: 20px;
        }
        
        .no-data h3 {
            color: var(--gray);
            margin-bottom: 10px;
        }
        
        /* ===== PESTAÑAS ===== */
        .tabs-container {
            margin-bottom: 30px;
        }
        
        .tabs-nav {
            display: flex;
            background: white;
            border-radius: 12px 12px 0 0;
            padding: 0;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
            overflow: hidden;
        }
        
        .tab-btn {
            flex: 1;
            padding: 18px 25px;
            border: none;
            background: transparent;
            cursor: pointer;
            font-weight: 600;
            font-size: 1.1em;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }
        
        .tab-btn.active {
            background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
            color: white;
        }
        
        .tab-btn:not(.active):hover {
            background: #f7fafc;
        }
        
        .tab-content {
            display: none;
            background: white;
            border-radius: 0 0 12px 12px;
            padding: 30px;
            box-shadow: 0 5px 20px rgba(0,0,0,0.08);
            min-height: 600px;
        }
        
        .tab-content.active {
            display: block;
            animation: fadeIn 0.5s ease;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        /* ===== ESTADÍSTICAS GENERALES ===== */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-bottom: 40px;
        }
        
        .stat-card {
            background: var(--gray-light);
            padding: 20px;
            border-radius: 12px;
            border-left: 4px solid var(--primary);
        }
        
        .stat-card h4 {
            color: var(--gray);
            font-size: 0.9em;
            margin-bottom: 8px;
            text-transform: uppercase;
        }
        
        .stat-card .number {
            font-size: 2.5em;
            font-weight: 700;
            color: var(--primary);
        }
        
        .stat-card .label {
            font-size: 0.85em;
            color: var(--gray);
            margin-top: 5px;
        }
        
        /* ===== SECCIÓN DE COMPROMISO ===== */
        .compromiso-general {
            margin-bottom: 40px;
            background: var(--gray-light);
            padding: 25px;
            border-radius: 12px;
            border-left: 5px solid var(--primary);
        }
        
        .compromiso-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            cursor: pointer;
        }
        
        .compromiso-header:hover {
            opacity: 0.8;
        }
        
        .compromiso-title {
            font-size: 1.4em;
            color: var(--primary);
            font-weight: 700;
        }
        
        .compromiso-count {
            background: var(--primary);
            color: white;
            padding: 5px 15px;
            border-radius: 20px;
            font-size: 0.9em;
        }
        
        .compromiso-content {
            display: none;
        }
        
        .compromiso-content.active {
            display: block;
            animation: slideDown 0.4s ease;
        }
        
        @keyframes slideDown {
            from { opacity: 0; height: 0; }
            to { opacity: 1; height: auto; }
        }
        
        .item-general {
            background: white;
            padding: 20px;
            margin-bottom: 15px;
            border-radius: 8px;
            border-left: 3px solid var(--secondary);
            box-shadow: 0 2px 5px rgba(0,0,0,0.05);
        }
        
        .item-pregunta {
            font-weight: 600;
            color: #2d3748;
            margin-bottom: 15px;
            font-size: 1.1em;
        }
        
        .item-stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
        }
        
        .stat-bloque {
            text-align: center;
            padding: 15px;
            background: #f7fafc;
            border-radius: 8px;
        }
        
        .stat-valor {
            font-size: 2em;
            font-weight: 700;
            margin-bottom: 5px;
        }
        
        .stat-valor.si { color: var(--success); }
        .stat-valor.no { color: var(--danger); }
        
        .stat-label {
            font-size: 0.85em;
            color: var(--gray);
        }
        
        /* ===== BARRA DE PROGRESO ===== */
        .progress-bar {
            width: 100%;
            height: 20px;
            background: #e2e8f0;
            border-radius: 10px;
            overflow: hidden;
            margin: 10px 0;
        }
        
        .progress-fill {
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 600;
            font-size: 0.85em;
            transition: width 0.5s ease;
        }
        
        .progress-fill.bg-success { background: var(--success); }
        .progress-fill.bg-danger { background: var(--danger); }
        .progress-fill.bg-warning { background: var(--warning); }
        
        /* ===== ÁREAS COMUNES ===== */
        .areas-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 10px;
            margin-top: 15px;
        }
        
        .area-card {
            background: white;
            padding: 15px;
            border-radius: 8px;
            text-align: center;
            border: 1px solid #e2e8f0;
        }
        
        .area-nombre {
            font-size: 0.9em;
            color: var(--gray);
            margin-bottom: 5px;
        }
        
        .area-valor {
            font-size: 1.5em;
            font-weight: 700;
            color: var(--primary);
        }
        
        /* ===== STATS HEADER ===== */
        .stats-header {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }
        
        .stat-header-card {
            background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
            color: white;
            padding: 20px;
            border-radius: 12px;
            text-align: center;
        }
        
        .stat-header-card h3 {
            font-size: 1.8em;
            margin-bottom: 5px;
        }
        
        .stat-header-card p {
            opacity: 0.9;
            font-size: 0.9em;
        }
        
        /* ===== VISTA DETALLE ===== */
        .institucion-card {
            background: white;
            border-radius: 12px;
            margin-bottom: 30px;
            box-shadow: 0 2px 15px rgba(0,0,0,0.08);
            overflow: hidden;
            transition: all 0.3s;
        }
        
        .institucion-card:hover {
            box-shadow: 0 5px 25px rgba(0,0,0,0.12);
        }
        
        .card-header {
            background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
            color: white;
            padding: 20px 25px;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .card-header:hover {
            background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
        }
        
        .card-header h3 {
            font-size: 1.3em;
            display: flex;
            align-items: center;
            gap: 12px;
        }
        
        .card-body {
            padding: 25px;
            display: none;
        }
        
        .card-body.active {
            display: block;
            animation: fadeIn 0.5s ease;
        }
        
        .info-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 15px;
            margin-bottom: 25px;
            padding: 20px;
            background: #f7fafc;
            border-radius: 8px;
        }
        
        .info-item {
            display: flex;
            flex-direction: column;
        }
        
        .info-item label {
            font-weight: 600;
            color: #4a5568;
            font-size: 0.85em;
            margin-bottom: 5px;
            text-transform: uppercase;
        }
        
        .info-item span {
            color: #2d3748;
            font-size: 1.em;
            padding: 8px 0;
        }
        
        /* ===== ESTILOS PARA COMPROMISOS DETALLE ===== */
        .compromiso-section-detalle {
            margin-top: 25px;
            border-top: 2px solid #e2e8f0;
            padding-top: 25px;
        }
        
        .compromiso-title-detalle {
            background-color: #f8f9fa;
            padding: 15px;
            border-left: 5px solid var(--primary);
            border-radius: 8px;
            margin-bottom: 20px;
            color: #2c3e50;
            font-size: 1.4em;
            font-weight: 700;
        }
        
        .pregunta-item-detalle {
            background: #ffffff;
            padding: 18px;
            margin-bottom: 15px;
            border-radius: 8px;
            border-left: 3px solid var(--primary);
            box-shadow: 0 2px 5px rgba(0,0,0,0.05);
        }
        
        .pregunta-header-detalle {
            font-weight: 600;
            color: #495057;
            margin-bottom: 8px;
            padding-bottom: 5px;
            border-bottom: 1px dashed #dee2e6;
        }
        
        .respuesta-detalle {
            color: #6c757d;
            padding-left: 10px;
        }
        
        .badge {
            display: inline-block;
            padding: 5px 12px;
            border-radius: 20px;
            font-size: 0.85em;
            font-weight: 600;
            margin: 3px;
        }
        
        .badge-success { background: #c6f6d5; color: #22543d; }
        .badge-danger { background: #fed7d7; color: #742a2a; }
        .badge-info { background: #bee3f8; color: #2c5282; }
        .badge-warning { background: #feebc8; color: #7c2d12; }
        
        .list-items {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 8px;
        }
        
        .list-items .badge {
            margin: 0;
        }
        
        .toggle-icon {
            transition: transform 0.3s;
        }
        
        .toggle-icon.rotated {
            transform: rotate(180deg);
        }
        
        .sub-item-detalle {
            margin-top: 10px;
            padding-left: 15px;
            border-left: 2px solid #e9ecef;
        }
        
        .sub-header-detalle {
            font-weight: 500;
            color: #6c757d;
            margin-bottom: 5px;
        }
        
        .sub-content-detalle {
            color: #495057;
        }
        
        /* ESTILOS PARA RESULTADOS DETALLADOS */
        .resultados-detallados-section {
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            padding: 25px;
            border-radius: 12px;
            margin-bottom: 30px;
            border: 2px solid var(--primary);
        }
        
        .nivel-resultados {
            margin-bottom: 30px;
        }
        
        .nivel-header {
            background: var(--primary);
            color: white;
            padding: 15px 20px;
            border-radius: 8px 8px 0 0;
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
        }
        
        .nivel-header:hover {
            background: #004085;
        }
        
        .nivel-titulo {
            font-size: 1.3em;
            font-weight: 700;
        }
        
        .nivel-resumen {
            font-size: 0.9em;
            opacity: 0.9;
        }
        
        .nivel-content {
            background: white;
            padding: 20px;
            border-radius: 0 0 8px 8px;
            border: 1px solid #dee2e6;
            border-top: none;
            display: none;
        }
        
        .nivel-content.active {
            display: block;
            animation: fadeIn 0.3s ease;
        }
        
        .estadisticas-resumen {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            margin-bottom: 20px;
            padding: 15px;
            background: #f8f9fa;
            border-radius: 6px;
        }
        
        .estadistica-resumen-item {
            text-align: center;
            padding: 15px;
            border-radius: 6px;
            background: white;
            border: 1px solid #dee2e6;
        }
        
        .estadistica-valor {
            font-size: 2em;
            font-weight: 700;
            margin-bottom: 5px;
        }
        
        .estadistica-label {
            font-size: 0.9em;
            color: #6c757d;
            margin-bottom: 3px;
        }
        
        .estadistica-porcentaje {
            font-size: 0.85em;
            font-weight: 600;
        }
        
        /* Tabla de grados */
        .grados-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 15px;
            background: white;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 2px 5px rgba(0,0,0,0.05);
        }
        
        .grados-table th {
            background: var(--primary);
            color: white;
            padding: 12px 15px;
            text-align: left;
            font-weight: 600;
        }
        
        .grados-table td {
            padding: 12px 15px;
            border-bottom: 1px solid #e9ecef;
        }
        
        .grados-table tr:hover {
            background: #f8f9fa;
        }
        
        .porcentaje-cell {
            font-weight: 600;
        }
        
        .aprobado-cell { color: #28a745; }
        .desaprobado-cell { color: #dc3545; }
        .recuperacion-cell { color: #ffc107; }
        
        /* Estilos para resultados por grado en detalle */
        .resultados-estudiantes-section {
            background-color: #f8f9fa;
            padding: 15px;
            border-radius: 5px;
            margin-bottom: 20px;
            border: 1px solid #e9ecef;
        }
        
        .resultados-subtitle {
            color: #495057;
            margin-bottom: 15px;
            padding-bottom: 8px;
            border-bottom: 2px solid #dee2e6;
        }
        
        .resultados-grado-detalle {
            margin-bottom: 15px;
        }
        
        .resultados-header {
            font-weight: 600;
            color: #495057;
            margin-bottom: 10px;
        }
        
        .resultados-content {
            padding-left: 10px;
        }
        
        .resultados-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 10px;
        }
        
        .resultado-item {
            display: flex;
            justify-content: space-between;
            padding: 8px 12px;
            background-color: white;
            border-radius: 4px;
            border: 1px solid #dee2e6;
        }
        
        .grado-label {
            font-weight: 500;
            color: #495057;
        }
        
        .grado-valor {
            font-weight: 600;
        }
        
        .grado-valor.aprobados {
            color: #28a745;
        }
        
        .grado-valor.desaprobados {
            color: #dc3545;
        }
        
        .grado-valor.recuperacion {
            color: #ffc107;
        }
        
        .grado-valor.promedio {
            color: #007bff;
        }
        
        /* Barra de progreso horizontal */
        .progress-horizontal {
            display: flex;
            height: 30px;
            border-radius: 15px;
            overflow: hidden;
            margin: 10px 0;
            border: 1px solid #dee2e6;
        }
        
        .progress-aprobados {
            background: #28a745;
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            font-size: 0.9em;
        }
        
        .progress-desaprobados {
            background: #dc3545;
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            font-size: 0.9em;
        }
        
        .progress-recuperacion {
            background: #ffc107;
            color: #212529;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            font-size: 0.9em;
        }
        
        /* ===== NUEVOS ESTILOS PARA TABLAS DAT ===== */
        .dat-results-section {
            background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
            padding: 25px;
            border-radius: 12px;
            margin: 30px 0;
            border: 2px solid var(--primary);
        }
        
        .dat-section-title {
            color: var(--primary);
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 3px solid var(--primary);
            font-size: 1.6em;
        }
        
        .dat-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 15px;
            background: white;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 3px 10px rgba(0,0,0,0.08);
        }
        
        .dat-table th {
            background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
            color: white;
            padding: 15px;
            text-align: center;
            font-weight: 700;
            font-size: 1em;
        }
        
        .dat-table td {
            padding: 15px;
            border-bottom: 1px solid #e9ecef;
            text-align: center;
            font-size: 0.95em;
        }
        
        .dat-table tr:hover {
            background: #f8f9fa;
            transition: background 0.3s;
        }
        
        .dat-meta-info {
            margin-top: 20px;
            padding: 15px;
            background: #e9ecef;
            border-radius: 8px;
            text-align: center;
            font-size: 0.9em;
            color: #6c757d;
        }
        
        @media (max-width: 768px) {
            .tab-btn {
                font-size: 0.9em;
                padding: 12px 15px;
            }
            
            .stats-grid {
                grid-template-columns: 1fr;
            }
            
            .resultados-grid {
                grid-template-columns: 1fr;
            }
            
            .grados-table {
                display: block;
                overflow-x: auto;
            }
            
            .estadisticas-resumen {
                grid-template-columns: 1fr;
            }
            
            .dat-table {
                display: block;
                overflow-x: auto;
            }
            
            .dat-table th,
            .dat-table td {
                padding: 10px 8px;
                font-size: 0.85em;
            }
        }
        
        @media print {
            .filters, .tabs-nav {
                display: none;
            }
            
            .tab-content {
                display: block !important;
            }
        }