        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            /* Colores primarios */
            --primary: #6366f1;
            --primary-dark: #4f46e5;
            --primary-light: #818cf8;
            --secondary: #8b5cf6;
            --accent: #06b6d4;
            
            /* Colores de estado */
            --success: #10b981;
            --warning: #f59e0b;
            --danger: #ef4444;
            
            /* Tema oscuro fijo */
            --bg-primary: #0f172a;
            --bg-secondary: #1e293b;
            --bg-tertiary: #334155;
            --bg-card: #1e293b;
            --bg-hover: #334155;
            
            /* Textos */
            --text-primary: #f1f5f9;
            --text-secondary: #cbd5e1;
            --text-muted: #94a3b8;
            --text-light: #64748b;
            
            /* Bordes y divisores */
            --border: #334155;
            --border-light: #475569;
            --border-hover: #64748b;
            
            /* Sombras oscuras */
            --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
            --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
            --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
            --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
            
            /* Gradientes */
            --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
            --gradient-secondary: linear-gradient(135deg, #1e293b 0%, #334155 100%);
            --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
            
            /* Espaciado */
            --radius: 8px;
            --radius-lg: 12px;
            --radius-xl: 16px;

            /* Variables móviles */
            --mobile-padding: 1rem;
            --mobile-margin: 0.75rem;
            --touch-target: 44px; /* Tamaño mínimo recomendado para elementos táctiles */
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            line-height: 1.6;
            color: var(--text-primary);
            background: var(--bg-primary);
            overflow-x: hidden;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            /* Mejoras para móvil */
            -webkit-tap-highlight-color: transparent;
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
        }

        /* Permitir selección de texto en elementos específicos */
        p, h1, h2, h3, h4, h5, h6, span, .module-description, .hero-text p {
            -webkit-user-select: text;
            -moz-user-select: text;
            -ms-user-select: text;
            user-select: text;
        }

        /* =================================
        NAVEGACIÓN RESPONSIVE MEJORADA
        ================================= */
        .navbar {
            position: fixed;
            top: 0;
            width: 100%;
            background: rgba(15, 23, 42, 0.95);
            backdrop-filter: blur(12px);
            border-bottom: 1px solid var(--border);
            z-index: 1000;
            transition: all 0.3s ease;
            /* Mejoras móviles */
            -webkit-backdrop-filter: blur(12px);
        }

        .navbar.scrolled {
            background: rgba(15, 23, 42, 0.98);
            box-shadow: var(--shadow-lg);
        }

        .nav-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 1rem 2rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            min-height: 60px; /* Altura mínima para consistencia */
        }

        .logo {
            font-size: 1.75rem;
            font-weight: 700;
            background: var(--gradient-primary);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            text-decoration: none;
            /* Mejorar toque en móvil */
            min-height: var(--touch-target);
            min-width: var(--touch-target);
        }

        .logo i {
            color: var(--primary);
            background: none;
            -webkit-text-fill-color: var(--primary);
        }

        .nav-buttons {
            display: flex;
            gap: 0.75rem;
            align-items: center;
        }

        .btn {
            padding: 0.75rem 1.5rem;
            border: none;
            border-radius: var(--radius);
            font-size: 0.95rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            white-space: nowrap;
            position: relative;
            overflow: hidden;
            /* Mejoras táctiles */
            min-height: var(--touch-target);
            min-width: var(--touch-target);
            -webkit-tap-highlight-color: transparent;
        }

        .btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
            transition: left 0.5s ease;
        }

        .btn:hover::before {
            left: 100%;
        }

        .btn-outline {
            background: transparent;
            color: var(--text-secondary);
            border: 1px solid var(--border);
            backdrop-filter: blur(8px);
        }

        .btn-outline:hover {
            border-color: var(--primary);
            color: var(--primary);
            background: rgba(99, 102, 241, 0.1);
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }

        .btn-primary {
            background: var(--gradient-primary);
            color: white;
            border: 1px solid transparent;
            box-shadow: var(--shadow);
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
            filter: brightness(1.1);
        }

        /* Mobile Navigation */
        .mobile-menu-toggle {
            display: none;
            background: none;
            border: none;
            color: var(--text-primary);
            font-size: 1.5rem;
            cursor: pointer;
            padding: 0.75rem; /* Área táctil más grande */
            border-radius: var(--radius);
            transition: all 0.3s ease;
            min-height: var(--touch-target);
            min-width: var(--touch-target);
            -webkit-tap-highlight-color: transparent;
        }

        .mobile-menu-toggle:hover {
            background: var(--bg-hover);
            color: var(--primary);
        }

        .mobile-menu-toggle:active {
            transform: scale(0.95);
        }

        /* Mobile Menu */
        .mobile-menu {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: var(--bg-secondary);
            border-bottom: 1px solid var(--border);
            box-shadow: var(--shadow-lg);
            transform: translateY(-100%);
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            max-height: 0;
            overflow: hidden;
        }

        .mobile-menu.active {
            transform: translateY(0);
            opacity: 1;
            visibility: visible;
            max-height: 300px;
        }

        .mobile-menu .nav-buttons {
            display: flex;
            flex-direction: column;
            padding: 1.5rem 2rem;
            gap: 1rem;
        }

        .mobile-menu .btn {
            width: 100%;
            justify-content: center;
            padding: 1rem 1.5rem;
            font-size: 1rem; /* Texto más grande en móvil */
        }

        /* =================================
        SECCIÓN HERO MEJORADA
        ================================= */
        .hero {
            margin-top: 80px;
            padding: 6rem 2rem;
            background: var(--gradient-hero);
            position: relative;
            overflow: hidden;
            min-height: 90vh;
            display: flex;
            align-items: center;
        }

        .hero::before {
            content: '';
            position: absolute;
            top: -50%;
            right: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
            animation: rotate 30s linear infinite;
        }

        .hero::after {
            content: '';
            position: absolute;
            bottom: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 60%);
            animation: rotate 45s linear infinite reverse;
        }

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

        .hero-content {
            max-width: 1200px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 4rem;
            align-items: center;
            position: relative;
            z-index: 1;
        }

        .hero-text h1 {
            font-size: 3.5rem;
            font-weight: 700;
            line-height: 1.2;
            margin-bottom: 1.5rem;
            color: var(--text-primary);
        }

        .hero-text .highlight {
            background: var(--gradient-primary);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .hero-text p {
            font-size: 1.25rem;
            color: var(--text-secondary);
            margin-bottom: 2.5rem;
            line-height: 1.8;
        }

        .hero-buttons {
            margin-bottom: 2.5rem;
        }

        .hero-buttons-row {
            display: flex;
            gap: 1rem;
            flex-wrap: wrap;
            justify-content: flex-start;
        }

        .hero-buttons-center {
            display: flex;
            justify-content: center;
            margin-top: 1rem;
        }

        .btn-secondary {
            background: rgba(6, 182, 212, 0.1);
            color: var(--accent);
            border: 1px solid rgba(6, 182, 212, 0.3);
            backdrop-filter: blur(8px);
        }

        .btn-secondary:hover {
            border-color: var(--accent);
            background: rgba(6, 182, 212, 0.2);
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(6, 182, 212, 0.3);
        }

        .hero-features {
            display: flex;
            gap: 2rem;
            align-items: center;
            color: var(--text-muted);
            flex-wrap: wrap;
        }

        .hero-feature {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .hero-feature i {
            color: var(--primary);
        }

        .hero-visual {
            position: relative;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .dashboard-preview {
            width: 100%;
            max-width: 500px;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: var(--radius-xl);
            box-shadow: var(--shadow-xl);
            padding: 2rem;
            transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
            transition: transform 0.5s ease;
            backdrop-filter: blur(10px);
        }

        .dashboard-preview:hover {
            transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
        }

        .dashboard-header {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-bottom: 2rem;
            padding-bottom: 1rem;
            border-bottom: 1px solid var(--border);
        }

        .dashboard-header .icon {
            width: 40px;
            height: 40px;
            background: var(--gradient-primary);
            border-radius: var(--radius);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
        }

        .dashboard-stat {
            background: var(--bg-tertiary);
            padding: 1.5rem;
            border-radius: var(--radius);
            margin-bottom: 1rem;
            border: 1px solid var(--border);
            transition: all 0.3s ease;
        }

        .dashboard-stat:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
            border-color: var(--primary);
        }

        .dashboard-stat h4 {
            font-size: 0.875rem;
            color: var(--text-muted);
            margin-bottom: 0.5rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .dashboard-stat .number {
            font-size: 2rem;
            font-weight: 700;
            color: var(--primary);
        }

        /* =================================
        SECCIONES RESTANTES
        ================================= */
        .section-header {
            text-align: center;
            max-width: 700px;
            margin: 0 auto 4rem;
        }

        .section-header h2 {
            font-size: 2.5rem;
            font-weight: 700;
            margin-bottom: 1rem;
            color: var(--text-primary);
        }

        .section-header p {
            font-size: 1.125rem;
            color: var(--text-secondary);
            line-height: 1.8;
        }

        /* =================================
        MÓDULOS DESTACADOS - MEJORADOS CON DISEÑOS REALES
        ================================= */
        .modules-section {
            padding: 6rem 2rem;
            background: var(--bg-secondary);
            position: relative;
        }

        .modules-section::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 1px;
            background: linear-gradient(90deg, transparent, var(--primary), transparent);
        }

        .modules-grid {
            max-width: 1400px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
            gap: 2.5rem;
            margin-top: 3rem;
        }

        .module-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: var(--radius-xl);
            padding: 0;
            position: relative;
            transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            overflow: hidden;
            cursor: pointer;
            min-height: 600px;
            /* Mejoras táctiles */
            -webkit-tap-highlight-color: transparent;
        }

        .module-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.05), transparent);
            transition: left 0.6s ease;
        }

        .module-card:hover::before {
            left: 100%;
        }

        .module-card::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: var(--gradient-primary);
            transform: scaleX(0);
            transform-origin: left;
            transition: transform 0.4s ease;
        }

        .module-card:hover {
            transform: translateY(-8px) scale(1.02);
            box-shadow: var(--shadow-xl);
            border-color: rgba(99, 102, 241, 0.3);
        }

        .module-card:hover::after {
            transform: scaleX(1);
        }

        .module-content {
            padding: 2rem;
            height: 100%;
            display: flex;
            flex-direction: column;
        }

        .module-header {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-bottom: 1.5rem;
        }

        .module-icon {
            width: 50px;
            height: 50px;
            background: var(--gradient-primary);
            border-radius: var(--radius-lg);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.25rem;
            color: white;
            box-shadow: var(--shadow);
            transition: all 0.3s ease;
            flex-shrink: 0; /* Evitar que se encoja en móvil */
        }

        .module-card:hover .module-icon {
            transform: scale(1.1) rotate(5deg);
            box-shadow: var(--shadow-lg);
        }

        .module-info {
            flex: 1;
        }

        .module-info h3 {
            font-size: 1.3rem;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 0.25rem;
            line-height: 1.3;
        }

        .module-status {
            font-size: 0.75rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            padding: 0.25rem 0.75rem;
            border-radius: 20px;
            display: inline-block;
        }

        .module-status.available {
            background: rgba(16, 185, 129, 0.1);
            color: var(--success);
            border: 1px solid rgba(16, 185, 129, 0.2);
        }

        .module-description {
            color: var(--text-secondary);
            line-height: 1.6;
            margin-bottom: 1.5rem;
            font-size: 0.95rem;
        }

        /* =================================
        DISEÑOS VISUALES DE MÓDULOS MEJORADOS
        ================================= */

        .module-preview {
            background: var(--bg-primary);
            border: 1px solid var(--border);
            border-radius: var(--radius);
            padding: 1rem;
            margin-bottom: 1.5rem;
            min-height: 250px;
            position: relative;
            overflow: hidden;
            /* Scroll horizontal para tablas en móvil */
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }

        .module-preview::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 2px;
            background: var(--gradient-primary);
        }

        /* Gestión de Estudiantes - Tabla mejorada con validación CR */
        .students-table {
            width: 100%;
            font-size: 0.75rem;
            min-width: 400px; /* Ancho mínimo para evitar compresión excesiva */
        }

        .students-table th,
        .students-table td {
            padding: 0.5rem 0.3rem;
            text-align: left;
            border-bottom: 1px solid var(--border);
            white-space: nowrap; /* Evitar corte de texto */
        }

        .students-table th {
            background: var(--bg-tertiary);
            color: var(--text-muted);
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            position: sticky;
            top: 0; /* Cabeceras fijas en scroll */
            z-index: 1;
        }

        .students-table td {
            color: var(--text-secondary);
        }

        .status-badge {
            padding: 0.2rem 0.5rem;
            border-radius: 12px;
            font-size: 0.6rem;
            font-weight: 600;
            text-transform: uppercase;
        }

        .status-active {
            background: rgba(16, 185, 129, 0.2);
            color: var(--success);
        }

        .status-inactive {
            background: rgba(239, 68, 68, 0.2);
            color: var(--danger);
        }

        .cedula-valid {
            background: rgba(16, 185, 129, 0.1);
            padding: 0.2rem 0.4rem;
            border-radius: 4px;
            border: 1px solid rgba(16, 185, 129, 0.3);
        }

        /* Control de Asistencia - Interfaz real mejorada */
        .attendance-interface {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }

        .attendance-controls {
            display: flex;
            gap: 0.5rem;
            margin-bottom: 1rem;
            flex-wrap: wrap;
        }

        .attendance-btn {
            padding: 0.4rem 0.8rem;
            border: 1px solid var(--border);
            border-radius: var(--radius);
            background: var(--bg-tertiary);
            color: var(--text-secondary);
            font-size: 0.65rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            /* Mejoras táctiles */
            min-height: 36px;
            -webkit-tap-highlight-color: transparent;
        }

        .attendance-btn.success {
            background: rgba(16, 185, 129, 0.2);
            border-color: var(--success);
            color: var(--success);
        }

        .attendance-btn.warning {
            background: rgba(245, 158, 11, 0.2);
            border-color: var(--warning);
            color: var(--warning);
        }

        .attendance-btn.danger {
            background: rgba(239, 68, 68, 0.2);
            border-color: var(--danger);
            color: var(--danger);
        }

        .student-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.75rem;
            background: var(--bg-tertiary);
            border-radius: var(--radius);
            margin-bottom: 0.5rem;
            border: 1px solid var(--border);
            /* Mejoras táctiles */
            min-height: var(--touch-target);
        }

        .student-info {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            flex: 1;
            min-width: 0; /* Permitir truncado */
        }

        .student-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.7rem;
            font-weight: 600;
            color: white;
            flex-shrink: 0;
        }

        .student-avatar.avatar-1 { background: #6366f1; }
        .student-avatar.avatar-2 { background: #8b5cf6; }
        .student-avatar.avatar-3 { background: #06b6d4; }
        .student-avatar.avatar-4 { background: #10b981; }
        .student-avatar.avatar-5 { background: #f59e0b; }
        .student-avatar.avatar-6 { background: #ef4444; }
        .student-avatar.avatar-7 { background: #84cc16; }

        .student-name {
            font-size: 0.75rem;
            color: var(--text-primary);
            font-weight: 500;
            /* Truncar texto largo en móvil */
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .attendance-status {
            display: flex;
            align-items: center;
            gap: 1rem;
            flex-shrink: 0;
        }

        .status-badge-new {
            padding: 0.3rem 0.6rem;
            border-radius: 12px;
            font-size: 0.65rem;
            font-weight: 600;
            white-space: nowrap;
        }

        .status-presente {
            background: rgba(16, 185, 129, 0.2);
            color: var(--success);
        }

        .status-ausente-j {
            background: rgba(6, 182, 212, 0.2);
            color: var(--accent);
        }

        .status-tardia-j {
            background: rgba(245, 158, 11, 0.2);
            color: var(--warning);
        }

        .status-ausente-i {
            background: rgba(239, 68, 68, 0.2);
            color: var(--danger);
        }

        .mep-percentage {
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--success);
        }

        /* Módulo Cotidiano - Matriz de calificaciones real */
        .cotidiano-matrix {
            display: flex;
            flex-direction: column;
            gap: 1rem;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }

        .matrix-header {
            display: grid;
            grid-template-columns: 120px repeat(4, 1fr) 60px 60px;
            gap: 0.3rem;
            padding: 0.5rem;
            background: var(--bg-tertiary);
            border-radius: var(--radius);
            font-size: 0.65rem;
            font-weight: 600;
            color: var(--text-muted);
            min-width: 500px; /* Ancho mínimo para scroll horizontal */
            position: sticky;
            top: 0;
            z-index: 1;
        }

        .matrix-row {
            display: grid;
            grid-template-columns: 120px repeat(4, 1fr) 60px 60px;
            gap: 0.3rem;
            align-items: center;
            padding: 0.5rem;
            background: var(--bg-tertiary);
            border-radius: var(--radius);
            border: 1px solid var(--border);
            min-width: 500px; /* Ancho mínimo para scroll horizontal */
        }

        .matrix-student {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            min-width: 0;
        }

        .matrix-student-avatar {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.6rem;
            font-weight: 600;
            color: white;
            flex-shrink: 0;
        }

        .matrix-student-avatar.avatar-cn { background: #6366f1; }
        .matrix-student-avatar.avatar-gr { background: #ec4899; }
        .matrix-student-avatar.avatar-hr { background: #06b6d4; }
        .matrix-student-avatar.avatar-lh { background: #84cc16; }
        .matrix-student-avatar.avatar-mc { background: #f59e0b; }
        .matrix-student-avatar.avatar-rm { background: #8b5cf6; }
        .matrix-student-avatar.avatar-rs { background: #ef4444; }

        .matrix-student-name {
            font-size: 0.65rem;
            color: var(--text-primary);
            font-weight: 500;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .grade-box {
            width: 28px;
            height: 28px;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.7rem;
            font-weight: 600;
            margin: 0 auto;
            cursor: pointer;
            transition: all 0.2s ease;
            /* Mejoras táctiles */
            min-width: 32px;
            min-height: 32px;
            -webkit-tap-highlight-color: transparent;
        }

        .grade-box:active {
            transform: scale(0.95);
        }

        .grade-box.grade-1 {
            background: #ef4444;
            color: white;
        }

        .grade-box.grade-2 {
            background: #f59e0b;
            color: white;
        }

        .grade-box.grade-3 {
            background: #10b981;
            color: white;
        }

        .cotidiano-total, .total-score {
            font-size: 0.7rem;
            font-weight: 600;
            color: var(--text-primary);
            text-align: center;
        }

        /* Sistema SEA - Tabla mejorada con ponderaciones MEP exactas */
        .sea-header {
            background: var(--bg-tertiary);
            padding: 0.75rem;
            border-radius: var(--radius);
            margin-bottom: 1rem;
            text-align: center;
        }

        .sea-table {
            width: 100%;
            font-size: 0.7rem;
            min-width: 600px; /* Ancho mínimo para scroll horizontal */
        }

        .sea-table th,
        .sea-table td {
            padding: 0.4rem 0.2rem;
            text-align: center;
            border-bottom: 1px solid var(--border);
            white-space: nowrap;
        }

        .sea-table th {
            background: var(--bg-tertiary);
            color: var(--text-muted);
            font-weight: 600;
            font-size: 0.65rem;
            position: sticky;
            top: 0;
            z-index: 1;
        }

        .weight-info {
            font-size: 0.55rem;
            color: var(--text-light);
            font-style: italic;
        }

        .grade-excellent {
            background: rgba(16, 185, 129, 0.2);
            color: var(--success);
            font-weight: 600;
        }

        .grade-good {
            background: rgba(6, 182, 212, 0.2);
            color: var(--accent);
            font-weight: 600;
        }

        .grade-regular {
            background: rgba(245, 158, 11, 0.2);
            color: var(--warning);
            font-weight: 600;
        }

        /* Gestión de Materias - Lista mejorada */
        .subjects-list {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }

        .subject-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.75rem;
            background: var(--bg-tertiary);
            border-radius: var(--radius);
            border-left: 3px solid var(--primary);
            /* Mejoras móviles */
            min-height: var(--touch-target);
        }

        .subject-info {
            flex: 1;
            min-width: 0;
        }

        .subject-info h5 {
            color: var(--text-primary);
            font-size: 0.8rem;
            margin-bottom: 0.2rem;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .subject-details {
            font-size: 0.65rem;
            color: var(--text-muted);
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .subject-stats {
            text-align: right;
            font-size: 0.65rem;
            color: var(--text-muted);
            flex-shrink: 0;
        }

        /* Evaluaciones - Interfaz mejorada */
        .evaluations-interface {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }

        .eval-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.75rem;
            background: var(--bg-tertiary);
            border-radius: var(--radius);
            border: 1px solid var(--border);
            min-height: var(--touch-target);
        }

        .eval-info {
            flex: 1;
            min-width: 0;
        }

        .eval-info h5 {
            color: var(--text-primary);
            font-size: 0.75rem;
            margin-bottom: 0.2rem;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .eval-meta {
            font-size: 0.6rem;
            color: var(--text-muted);
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .eval-grade {
            text-align: right;
            flex-shrink: 0;
        }

        .eval-score {
            font-size: 0.9rem;
            font-weight: 700;
            color: var(--primary);
        }

        .eval-percentage {
            font-size: 0.6rem;
            color: var(--text-muted);
        }

        /* Reportes - Interfaz completa mejorada */
        .reports-main-interface {
            display: flex;
            gap: 1rem;
            height: 180px;
        }

        .reports-sidebar {
            width: 180px;
            background: var(--bg-tertiary);
            border-radius: var(--radius);
            padding: 1rem;
            border: 1px solid var(--border);
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }

        .report-types {
            margin-bottom: 1rem;
        }

        .report-types h6 {
            font-size: 0.65rem;
            color: var(--text-muted);
            text-transform: uppercase;
            margin-bottom: 0.5rem;
            font-weight: 600;
        }

        .report-type-buttons {
            display: flex;
            flex-direction: column;
            gap: 0.3rem;
        }

        .report-type-btn {
            padding: 0.4rem 0.6rem;
            border: 1px solid var(--border);
            background: var(--bg-primary);
            color: var(--text-secondary);
            border-radius: 4px;
            font-size: 0.6rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            text-align: center;
            min-height: 32px;
            -webkit-tap-highlight-color: transparent;
        }

        .report-type-btn.active {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
        }

        .report-filters {
            margin-bottom: 1rem;
        }

        .filter-group {
            margin-bottom: 0.75rem;
        }

        .filter-label {
            font-size: 0.65rem;
            color: var(--text-muted);
            margin-bottom: 0.3rem;
            display: block;
            font-weight: 500;
        }

        .filter-select {
            width: 100%;
            padding: 0.4rem;
            background: var(--bg-primary);
            border: 1px solid var(--border);
            border-radius: 4px;
            color: var(--text-secondary);
            font-size: 0.65rem;
            min-height: 32px;
        }

        .format-options {
            display: flex;
            flex-direction: column;
            gap: 0.4rem;
        }

        .format-option {
            display: flex;
            align-items: center;
            gap: 0.4rem;
            min-height: 32px;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }

        .format-checkbox {
            width: 16px;
            height: 16px;
            cursor: pointer;
        }

        .format-label {
            font-size: 0.6rem;
            color: var(--text-secondary);
            cursor: pointer;
            flex: 1;
        }

        .reports-preview {
            flex: 1;
            background: var(--bg-primary);
            border: 2px dashed var(--border);
            border-radius: var(--radius);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            padding: 2rem;
        }

        .preview-icon {
            width: 48px;
            height: 48px;
            background: rgba(99, 102, 241, 0.1);
            border-radius: var(--radius);
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 1rem;
            color: var(--primary);
            font-size: 1.5rem;
        }

        .preview-title {
            font-size: 0.8rem;
            color: var(--text-primary);
            font-weight: 600;
            margin-bottom: 0.5rem;
        }

        .preview-subtitle {
            font-size: 0.65rem;
            color: var(--text-muted);
            line-height: 1.4;
        }

        .module-features {
            list-style: none;
            margin-top: auto;
        }

        .module-features li {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-bottom: 0.5rem;
            color: var(--text-muted);
            font-size: 0.85rem;
        }

        .module-features li i {
            color: var(--success);
            font-size: 0.7rem;
            width: 16px;
            flex-shrink: 0;
        }

        .module-highlight {
            background: rgba(99, 102, 241, 0.1);
            border: 1px solid rgba(99, 102, 241, 0.2);
            border-radius: var(--radius);
            padding: 0.75rem;
            margin-top: 1rem;
            position: relative;
        }

        .module-highlight::before {
            content: '✨';
            position: absolute;
            top: -8px;
            left: 1rem;
            background: var(--bg-card);
            padding: 0 0.5rem;
            font-size: 0.875rem;
        }

        .module-highlight p {
            font-size: 0.8rem;
            color: var(--primary);
            font-weight: 500;
            margin: 0;
            line-height: 1.4;
        }

        /* Stats Section */
        .stats {
            padding: 4rem 2rem;
            background: var(--gradient-primary);
            color: white;
        }

        .stats-container {
            max-width: 1200px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 3rem;
            text-align: center;
        }

        .stat-item {
            opacity: 0;
            transform: translateY(20px);
            transition: all 0.6s ease;
        }

        .stat-item.animate {
            opacity: 1;
            transform: translateY(0);
        }

        .stat-item h3 {
            font-size: 3rem;
            font-weight: 700;
            margin-bottom: 0.5rem;
        }

        .stat-item p {
            font-size: 1.125rem;
            opacity: 0.9;
        }

        /* CTA Section */
        .cta {
            padding: 6rem 2rem;
            background: var(--bg-secondary);
            text-align: center;
        }

        .cta-content {
            max-width: 700px;
            margin: 0 auto;
        }

        .cta h2 {
            font-size: 2.5rem;
            font-weight: 700;
            margin-bottom: 1.5rem;
            color: var(--text-primary);
        }

        .cta p {
            font-size: 1.25rem;
            color: var(--text-secondary);
            margin-bottom: 2.5rem;
            line-height: 1.8;
        }

        .cta-buttons {
            display: flex;
            gap: 1rem;
            justify-content: center;
            flex-wrap: wrap;
        }

        .btn-large {
            font-size: 1.125rem;
            padding: 1rem 2rem;
            min-height: 50px; /* Área táctil más grande */
        }

        /* Footer */
        .footer {
            background: var(--bg-primary);
            color: var(--text-secondary);
            padding: 4rem 2rem 2rem;
            border-top: 1px solid var(--border);
        }

        .footer-content {
            max-width: 1200px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: 2fr 1fr 1fr;
            gap: 3rem;
            margin-bottom: 3rem;
        }

        .footer-brand h3 {
            font-size: 1.5rem;
            margin-bottom: 1rem;
            color: var(--text-primary);
        }

        .footer-brand p {
            line-height: 1.8;
        }

        .footer-section h4 {
            font-size: 1rem;
            margin-bottom: 1rem;
            color: var(--text-primary);
        }

        .footer-section ul {
            list-style: none;
        }

        .footer-section li {
            margin-bottom: 0.75rem;
        }

        .footer-section a {
            color: var(--text-muted);
            text-decoration: none;
            transition: color 0.3s ease;
            padding: 0.25rem 0; /* Área táctil más grande */
            display: block;
            min-height: 32px;
            line-height: 1.5;
        }

        .footer-section a:hover {
            color: var(--primary);
        }

        .footer-bottom {
            text-align: center;
            padding-top: 2rem;
            border-top: 1px solid var(--border);
            color: var(--text-muted);
        }

        /* Animaciones */
        .fade-in {
            opacity: 0;
            transform: translateY(30px);
            transition: opacity 0.8s ease, transform 0.8s ease;
        }

        .fade-in.animate {
            opacity: 1;
            transform: translateY(0);
        }

        /* =================================
        RESPONSIVE DESIGN MEJORADO PARA MÓVILES
        ================================= */

        /* Tablet landscape - 1024px */
        @media (max-width: 1024px) {
            .hero-content {
                gap: 3rem;
            }
            
            .hero-text h1 {
                font-size: 3rem;
            }
            
            .modules-grid {
                grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
                gap: 2rem;
            }
        }

        /* Tablet portrait - 768px */
        @media (max-width: 768px) {
            /* Variables móviles */
            :root {
                --mobile-padding: 1rem;
                --mobile-margin: 0.75rem;
            }

            /* Navegación móvil */
            .nav-buttons {
                display: none;
            }

            .mobile-menu-toggle {
                display: block;
            }

            .nav-container {
                padding: var(--mobile-padding) 1.5rem;
            }

            /* Hero adaptado */
            .hero {
                padding: 4rem var(--mobile-padding);
                min-height: auto;
                margin-top: 60px; /* Navbar más pequeña en móvil */
            }

            .hero-content {
                grid-template-columns: 1fr;
                gap: 3rem;
                text-align: center;
            }

            .hero-text h1 {
                font-size: 2.5rem;
                line-height: 1.2;
            }

            .hero-text p {
                font-size: 1.125rem;
                margin-bottom: 2rem;
            }

            .hero-buttons-row {
                justify-content: center;
                gap: 0.75rem;
            }

            .hero-buttons-center {
                margin-top: 1rem;
            }

            .hero-features {
                justify-content: center;
                gap: 1.5rem;
            }

            .hero-feature {
                font-size: 0.9rem;
            }

            /* Dashboard preview */
            .dashboard-preview {
                transform: none;
                max-width: 100%;
                padding: 1.5rem;
            }

            .dashboard-stat {
                padding: 1rem;
            }

            .dashboard-stat .number {
                font-size: 1.5rem;
            }

            /* Módulos adaptados */
            .modules-section {
                padding: 4rem var(--mobile-padding);
            }

            .modules-grid {
                grid-template-columns: 1fr;
                gap: 1.5rem;
                margin-top: 2rem;
            }

            .module-card {
                min-height: 500px;
            }

            .module-content {
                padding: 1.5rem;
            }

            .module-icon {
                width: 45px;
                height: 45px;
                font-size: 1.1rem;
            }

            .module-info h3 {
                font-size: 1.2rem;
            }

            /* Tablas mejoradas para móvil */
            .module-preview {
                padding: 0.75rem;
                min-height: 200px;
            }

            .students-table {
                font-size: 0.7rem;
                min-width: 350px;
            }

            .sea-table {
                font-size: 0.65rem;
                min-width: 550px;
            }

            /* Matriz cotidiano optimizada */
            .matrix-header,
            .matrix-row {
                grid-template-columns: 100px repeat(4, 50px) 50px 50px;
                gap: 0.25rem;
                padding: 0.4rem;
                min-width: 450px;
            }

            .matrix-student-name {
                font-size: 0.6rem;
            }

            .grade-box {
                width: 24px;
                height: 24px;
                font-size: 0.65rem;
                min-width: 28px;
                min-height: 28px;
            }

            /* Reportes móviles */
            .reports-main-interface {
                flex-direction: column;
                height: auto;
                gap: 1rem;
            }

            .reports-sidebar {
                width: 100%;
                order: 2;
            }

            .reports-preview {
                order: 1;
                min-height: 150px;
                padding: 1.5rem;
            }

            /* Asistencia móvil */
            .attendance-controls {
                gap: 0.4rem;
            }

            .attendance-btn {
                font-size: 0.6rem;
                padding: 0.3rem 0.6rem;
            }

            .student-row {
                padding: 0.6rem;
            }

            .student-name {
                font-size: 0.7rem;
            }

            .attendance-status {
                gap: 0.5rem;
            }

            .status-badge-new {
                font-size: 0.6rem;
                padding: 0.25rem 0.5rem;
            }

            /* Secciones generales */
            .section-header {
                margin-bottom: 3rem;
            }

            .section-header h2 {
                font-size: 2rem;
            }

            .section-header p {
                font-size: 1rem;
            }

            /* Stats responsive */
            .stats {
                padding: 3rem var(--mobile-padding);
            }

            .stats-container {
                grid-template-columns: repeat(2, 1fr);
                gap: 2rem;
            }

            .stat-item h3 {
                font-size: 2.5rem;
            }

            .stat-item p {
                font-size: 1rem;
            }

          

            /* CTA */
            .cta {
                padding: 4rem var(--mobile-padding);
            }

            .cta h2 {
                font-size: 2rem;
            }

            .cta p {
                font-size: 1.125rem;
                margin-bottom: 2rem;
            }

            .cta-buttons {
                flex-direction: column;
                align-items: center;
                gap: 0.75rem;
            }

            .btn-large {
                width: 100%;
                max-width: 300px;
            }

            /* Footer */
            .footer {
                padding: 3rem var(--mobile-padding) 2rem;
            }

            .footer-content {
                grid-template-columns: 1fr;
                gap: 2rem;
                text-align: center;
            }
        }

        /* Mobile pequeño - 480px */
        @media (max-width: 480px) {
            /* Navegación compacta */
            .nav-container {
                padding: 0.75rem 1rem;
            }

            .logo {
                font-size: 1.5rem;
            }

            /* Hero compacto */
            .hero {
                padding: 3rem 1rem;
                margin-top: 55px;
            }

            .hero-text h1 {
                font-size: 2rem;
                line-height: 1.1;
                margin-bottom: 1rem;
            }

            .hero-text p {
                font-size: 1rem;
                margin-bottom: 1.5rem;
            }

            .hero-buttons-row {
                flex-direction: column;
                gap: 0.75rem;
            }

            .hero-features {
                flex-direction: column;
                gap: 1rem;
                align-items: center;
            }

            .hero-feature {
                font-size: 0.85rem;
            }

            /* Botones móviles optimizados */
            .btn {
                padding: 0.75rem 1.25rem;
                font-size: 0.9rem;
                min-width: 120px;
            }

            .btn-large {
                padding: 1rem 1.5rem;
                font-size: 1rem;
                min-height: 50px;
                width: 100%;
                max-width: 280px;
            }

            /* Módulos ultra compactos */
            .modules-section {
                padding: 3rem 1rem;
            }

            .module-card {
                min-height: 450px;
            }

            .module-content {
                padding: 1.25rem;
            }

            .module-icon {
                width: 40px;
                height: 40px;
                font-size: 1rem;
            }

            .module-info h3 {
                font-size: 1.1rem;
                line-height: 1.2;
            }

            .module-description {
                font-size: 0.9rem;
                line-height: 1.5;
            }

            /* Tablas ultra compactas */
            .students-table {
                font-size: 0.65rem;
                min-width: 320px;
            }

            .students-table th,
            .students-table td {
                padding: 0.4rem 0.2rem;
            }

            .sea-table {
                font-size: 0.6rem;
                min-width: 480px;
            }

            /* Matriz ultra compacta */
            .matrix-header,
            .matrix-row {
                grid-template-columns: 80px repeat(4, 40px) 40px 40px;
                gap: 0.2rem;
                padding: 0.3rem;
                min-width: 350px;
                font-size: 0.6rem;
            }

            .matrix-student-avatar {
                width: 20px;
                height: 20px;
                font-size: 0.55rem;
            }

            .matrix-student-name {
                font-size: 0.55rem;
            }

            .grade-box {
                width: 20px;
                height: 20px;
                font-size: 0.6rem;
                min-width: 24px;
                min-height: 24px;
            }

            /* Asistencia compacta */
            .attendance-btn {
                font-size: 0.55rem;
                padding: 0.25rem 0.5rem;
                min-height: 32px;
            }

            .student-avatar {
                width: 28px;
                height: 28px;
                font-size: 0.65rem;
            }

            .student-name {
                font-size: 0.65rem;
            }

            .status-badge-new {
                font-size: 0.55rem;
                padding: 0.2rem 0.4rem;
            }

            .mep-percentage {
                font-size: 0.65rem;
            }

            /* Reportes móvil pequeño */
            .reports-sidebar {
                padding: 0.75rem;
            }

            .report-type-btn {
                font-size: 0.55rem;
                padding: 0.3rem 0.5rem;
            }

            .filter-select {
                font-size: 0.6rem;
                padding: 0.3rem;
            }

            .format-label {
                font-size: 0.55rem;
            }

            /* Stats una columna */
            .stats {
                padding: 3rem 1rem;
            }

            .stats-container {
                grid-template-columns: 1fr;
                gap: 1.5rem;
            }

            .stat-item h3 {
                font-size: 2.25rem;
            }

  

            /* CTA compacto */
            .cta {
                padding: 3rem 1rem;
            }

            .cta h2 {
                font-size: 1.75rem;
                line-height: 1.2;
            }

            .cta p {
                font-size: 1rem;
            }

            /* Footer compacto */
            .footer {
                padding: 2.5rem 1rem 1.5rem;
            }

            .footer-brand h3 {
                font-size: 1.25rem;
            }

            .footer-brand p {
                font-size: 0.9rem;
                line-height: 1.6;
            }

            .footer-section h4 {
                font-size: 0.9rem;
            }

            .footer-section a {
                font-size: 0.85rem;
                padding: 0.2rem 0;
                min-height: 28px;
            }

            .footer-bottom {
                font-size: 0.8rem;
                padding-top: 1.5rem;
            }
        }

        /* Mobile extra pequeño - 360px */
        @media (max-width: 360px) {
            .hero-text h1 {
                font-size: 1.75rem;
            }

            .module-content {
                padding: 1rem;
            }

            .module-icon {
                width: 36px;
                height: 36px;
                font-size: 0.9rem;
            }

            .matrix-header,
            .matrix-row {
                grid-template-columns: 70px repeat(4, 35px) 35px 35px;
                min-width: 300px;
            }

            .grade-box {
                width: 18px;
                height: 18px;
                font-size: 0.55rem;
                min-width: 22px;
                min-height: 22px;
            }

            .btn-large {
                max-width: 250px;
                font-size: 0.9rem;
            }
        }

        /* Mejoras de accesibilidad */
        @media (prefers-reduced-motion: reduce) {
            *,
            *::before,
            *::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
            }
        }

        /* Focus states mejorados para móvil */
        .btn:focus,
        .mobile-menu-toggle:focus,
        .grade-box:focus,
        .attendance-btn:focus,
        .report-type-btn:focus {
            outline: 2px solid var(--primary);
            outline-offset: 2px;
        }

        /* Estados activos para mejor feedback táctil */
        .btn:active {
            transform: scale(0.98);
        }

        .module-card:active {
            transform: translateY(-4px) scale(1.01);
        }

        .grade-box:active,
        .attendance-btn:active,
        .report-type-btn:active {
            transform: scale(0.95);
        }

        /* Scroll suave para toda la página */
        html {
            scroll-behavior: smooth;
        }

        /* Ocultar scrollbars en webkit para una apariencia más limpia */
        .module-preview::-webkit-scrollbar,
        .cotidiano-matrix::-webkit-scrollbar,
        .reports-sidebar::-webkit-scrollbar {
            height: 4px;
            width: 4px;
        }

        .module-preview::-webkit-scrollbar-track,
        .cotidiano-matrix::-webkit-scrollbar-track,
        .reports-sidebar::-webkit-scrollbar-track {
            background: var(--bg-tertiary);
        }

        .module-preview::-webkit-scrollbar-thumb,
        .cotidiano-matrix::-webkit-scrollbar-thumb,
        .reports-sidebar::-webkit-scrollbar-thumb {
            background: var(--border);
            border-radius: 2px;
        }

        .module-preview::-webkit-scrollbar-thumb:hover,
        .cotidiano-matrix::-webkit-scrollbar-thumb:hover,
        .reports-sidebar::-webkit-scrollbar-thumb:hover {
            background: var(--border-hover);
        }
