/* Reset y variables CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0070D1;
    --primary-dark: #00439C;
    --primary-darker: #00246E;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #1F1F1F;
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--white) 100%);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
}

/* Layout principal */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

/* App Header */
.app-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--gray-200);
    position: relative;
    z-index: 100;
}

.app-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    pointer-events: none;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-left > div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* Button Wrap Styles */
.button-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    --shadow-cuttoff-fix: 0.5em;
}

.button-shadow {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: rgba(0, 0, 0, 0.1);
    filter: blur(0.25em);
    opacity: 0;
    transition: opacity var(--anim--hover-time, 400ms) var(--anim--hover-ease, cubic-bezier(0.25, 1, 0.5, 1));
}

.button-shadow::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: rgba(255, 255, 255, 0.1);
    filter: blur(0.125em);
    opacity: 0;
    transition: opacity var(--anim--hover-time, 400ms) var(--anim--hover-ease, cubic-bezier(0.25, 1, 0.5, 1));
}

.button-wrap:has(button:hover) .button-shadow {
    filter: blur(clamp(2px, 0.0625em, 6px));
    transition: filter var(--anim--hover-time, 400ms) var(--anim--hover-ease, cubic-bezier(0.25, 1, 0.5, 1));
}

.button-wrap:has(button:hover) .button-shadow::after {
    top: calc(var(--shadow-cuttoff-fix) - 0.875em);
    opacity: 1;
}

.button-wrap:has(button:active) {
    /* Sin transformación */
}

/* Estilo específico para el botón volver-menu en estado activo */
.button-wrap.volver-menu:has(button:active) {
    /* Sin transformación */
}

.button-wrap.volver-menu {
    position: relative;
    z-index: 1000;
    pointer-events: auto;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.button-wrap.volver-menu button {
    --border-width: clamp(1px, 0.0625em, 4px);
    all: unset;
    cursor: pointer;
    position: relative;
    z-index: 3;
    background: linear-gradient(-75deg, rgba(255,255,255,0.05), rgba(255,255,255,0.2), rgba(255,255,255,0.05));
    border-radius: 50%;
    box-shadow: inset 0 0.125em 0.125em rgba(0,0,0,0.05),
      inset 0 -0.125em 0.125em rgba(255,255,255,0.5),
      0 0.25em 0.125em -0.125em rgba(0,0,0,0.2),
      0 0 0.1em 0.25em inset rgba(255,255,255,0.2),
      0 4px 15px rgba(59, 130, 246, 0.3),
      0 0 20px rgba(59, 130, 246, 0.15);
    backdrop-filter: blur(clamp(1px, 0.125em, 4px));
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.button-wrap.volver-menu button:hover {
    background: linear-gradient(-75deg, rgba(255,255,255,0.1), rgba(255,255,255,0.25), rgba(255,255,255,0.1));
}

.button-wrap.volver-menu button:active {
    background: linear-gradient(-75deg, rgba(255,255,255,0.15), rgba(255,255,255,0.3), rgba(255,255,255,0.15));
}

.button-wrap.volver-menu button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.button-wrap.volver-menu button:disabled:hover {
    background: linear-gradient(-75deg, rgba(255,255,255,0.05), rgba(255,255,255,0.2), rgba(255,255,255,0.05));
}

.button-wrap.volver-menu button span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0;
}

/* App Title */
.app-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 2rem;
    font-weight: 800;
    color: #3b82f6;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.02em;
}

.app-title svg {
    color: #3b82f6;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.app-subtitle {
    color: #1e40af;
    font-size: 1rem;
    margin: 0;
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Responsive para header */
@media (max-width: 768px) {
    .header-content {
        padding: 1rem;
    }
    
    .header-left {
        gap: 1rem;
    }
    
    .app-title {
        font-size: 1.5rem;
    }
    
    .app-subtitle {
        font-size: 0.9rem;
    }
    
    .button-wrap.volver-menu {
        width: 60px;
        height: 60px;
    }
    
    .button-wrap.volver-menu button {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0.75rem;
    }
    
    .app-title {
        font-size: 1.25rem;
    }
    
    .app-subtitle {
        font-size: 0.8rem;
    }
    
    .button-wrap.volver-menu {
        width: 50px;
        height: 50px;
    }
    
    .button-wrap.volver-menu button {
        width: 50px;
        height: 50px;
    }
}

/* Botón volver al launcher en esquina superior izquierda */
.btn-launcher-top {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    font-size: 0;
}

.btn-launcher-top:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 112, 209, 0.3);
}

.btn-launcher-top svg {
    width: 24px;
    height: 24px;
}

/* Estilos para temas del botón launcher */
body.theme-dark .btn-launcher-top {
    background: var(--primary-color);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

body.theme-dark .btn-launcher-top:hover {
    background: var(--primary-dark);
    box-shadow: 0 15px 35px rgba(0, 112, 209, 0.4);
}

body.theme-rosa .btn-launcher-top {
    background: #e91e63;
}

body.theme-rosa .btn-launcher-top:hover {
    background: #c2185b;
    box-shadow: 0 15px 35px rgba(233, 30, 99, 0.3);
}

body.theme-neon .btn-launcher-top {
    background: #00ffff;
    color: #000;
}

body.theme-neon .btn-launcher-top:hover {
    background: #00e6e6;
    box-shadow: 0 15px 35px rgba(0, 255, 255, 0.4);
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--gray-600);
    color: var(--white);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--gray-700);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-success {
    background: var(--success-color);
    color: var(--white);
}

.btn-success:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background: var(--white);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-outline:hover:not(:disabled) {
    background: var(--gray-50);
    border-color: var(--gray-400);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-500);
    padding: 0.25rem;
    border-radius: 4px;
    transition: var(--transition);
}

.btn-close:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    gap: 2rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Control Panel */
.control-panel {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    padding: 2rem;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 400px;
    max-width: 500px;
}

/* Optimizaciones para móviles */
@media (max-width: 768px) {
    .control-panel {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
    }
    
    .panel-section {
        padding: 1.5rem;
    }
    
    .section-title {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-group select,
    .form-group input {
        font-size: 1rem;
        padding: 0.75rem;
    }
    
    .form-actions .btn {
        width: 100%;
        padding: 0.75rem;
        font-size: 1rem;
    }
    
    .quick-actions {
        flex-direction: column;
    }
    
    .quick-actions .btn {
        width: 100%;
        min-width: auto;
    }
    
    .resume-evaluations-section .btn {
        width: 100%;
        min-width: auto;
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 480px) {
    .control-panel {
        padding: 1rem;
    }
    
    .panel-section {
        padding: 1rem;
    }
    
    .section-title {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .form-grid {
        gap: 0.75rem;
    }
    
    .form-group select,
    .form-group input {
        padding: 0.625rem;
        font-size: 0.9rem;
    }
    
    .form-actions .btn {
        padding: 0.625rem;
        font-size: 0.9rem;
    }
    
    .quick-actions .btn {
        padding: 0.625rem;
        font-size: 0.9rem;
    }
    
    .resume-evaluations-section .btn {
        padding: 0.625rem 0.75rem;
        font-size: 0.9rem;
    }

    .add-course-btn {
        padding: 0.625rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* Estado inicial: panel centrado */
.main-content:not(.evaluation-active) .control-panel {
    margin: 0 auto;
    transform: translateX(0);
}

/* Estado activo: panel deslizado hacia la izquierda */
.main-content.evaluation-active .control-panel {
    margin: 0;
    transform: translateX(0);
    flex-shrink: 0;
}

.panel-section {
    margin-bottom: 2rem;
}

.panel-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    align-items: end;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.9rem;
}

.form-group select,
.form-group input {
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--white);
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 112, 209, 0.1);
}

.form-group select:disabled,
.form-group input:disabled {
    background: var(--gray-100);
    color: var(--gray-500);
    cursor: not-allowed;
}

.add-course-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
    margin-top: 0.5rem;
}

.add-course-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.form-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.quick-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.quick-actions .btn {
    flex: 1;
    min-width: 150px;
}

.resume-evaluations-section {
    display: flex;
    justify-content: center;
    padding: 1rem 0;
}

.resume-evaluations-section .btn {
    min-width: 200px;
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
}

/* Evaluation Area */
.evaluation-area {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    flex: 1;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Optimizaciones para móviles */
@media (max-width: 768px) {
    .evaluation-area {
        border-radius: var(--border-radius);
        margin-top: 1rem;
    }
    
    .student-info {
        padding: 1.5rem;
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .student-details h2 {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }
    
    .student-details p {
        font-size: 0.9rem;
        margin-bottom: 0.125rem;
    }
    
    .evaluation-actions {
        width: 100%;
        justify-content: center;
        gap: 0.75rem;
    }
    
    .evaluation-actions .btn {
        flex: 1;
        justify-content: center;
        padding: 0.875rem;
        font-size: 0.9rem;
    }
    
    .rubrica-evaluation {
        padding: 1.5rem;
    }
    
    .evaluation-table-container {
        border-radius: 6px;
        margin: 0 -1.5rem;
        padding: 0 1.5rem;
    }
    
    .evaluation-table {
        min-width: 600px;
        font-size: 0.9rem;
    }
    
    .evaluation-table th,
    .evaluation-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .criterio-header {
        min-width: 150px;
    }
    
    .nivel-header {
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .evaluation-area {
        border-radius: 0;
        margin-top: 0.5rem;
        box-shadow: none;
        border: 1px solid var(--gray-200);
    }
    
    .student-info {
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .student-details h2 {
        font-size: 1.1rem;
    }
    
    .student-details p {
        font-size: 0.85rem;
    }
    
    .evaluation-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .evaluation-actions .btn {
        width: 100%;
        padding: 1rem;
        font-size: 0.95rem;
    }
    
    .rubrica-evaluation {
        padding: 1rem;
    }
    
    .evaluation-table-container {
        margin: 0 -1rem;
        padding: 0 1rem;
    }
    
    .evaluation-table {
        min-width: 500px;
        font-size: 0.85rem;
    }
    
    .evaluation-table th,
    .evaluation-table td {
        padding: 0.5rem 0.25rem;
    }
    
    .criterio-header {
        min-width: 120px;
    }
    
    .nivel-header {
        min-width: 100px;
    }
}

/* Estado activo: área de evaluación visible */
.main-content.evaluation-active .evaluation-area {
    opacity: 1;
    transform: translateX(0);
}

.student-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.student-details h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.student-details p {
    color: var(--gray-600);
    margin-bottom: 0.25rem;
}

.evaluation-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
}

/* Rubrica Evaluation */
.rubrica-evaluation {
    padding: 2rem;
}

.evaluation-table-container {
    overflow-x: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.evaluation-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    min-width: 800px;
}

.evaluation-table th,
.evaluation-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
    vertical-align: top;
}

.evaluation-table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-800);
    position: sticky;
    top: 0;
    z-index: 10;
}

.criterio-header {
    min-width: 200px;
    background: var(--primary-color);
    color: var(--white);
}

.nivel-header {
    min-width: 150px;
    text-align: center;
}

.nivel-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.nivel-points {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.criterio-cell {
    font-weight: 500;
    color: var(--gray-800);
}

.nivel-cell {
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.nivel-cell:hover {
    background: rgba(0, 112, 209, 0.05);
}

.nivel-cell.selected {
    background: rgba(0, 112, 209, 0.1);
    border: 2px solid var(--primary-color);
}

.nivel-radio {
    width: 20px;
    height: 20px;
    margin: 0 auto;
    cursor: pointer;
}

.nivel-descripcion {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* Results Panel */
.results-panel {
    padding: 2rem;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
}

/* Optimizaciones para móviles */
@media (max-width: 768px) {
    .results-panel {
        padding: 1.5rem;
}

.results-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    margin-bottom: 1.5rem;
}

.results-header h3 {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }
    
    .evaluated-student-info {
        padding: 0.75rem 1rem;
        border-radius: 6px;
        font-size: 0.9rem;
    }
    
    #evaluated-student-name {
        font-size: 1rem;
        font-weight: 600;
    }
    
    .score-display {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .score-item {
        padding: 1rem;
        border-radius: 8px;
    }
    
    .score-label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .score-value {
        font-size: 1.5rem;
        font-weight: 700;
    }
    
    .score-value.grade {
        font-size: 2rem;
    }
    
    .progress-bar {
        height: 8px;
        border-radius: 4px;
    }
    
    .comments-section {
        margin-top: 1.5rem;
    }
    
    .comments-label {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
    }
    
    .comments-textarea {
        min-height: 120px;
        padding: 1rem;
        font-size: 0.9rem;
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .results-panel {
        padding: 1rem;
    }
    
    .results-header {
        gap: 0.75rem;
        margin-bottom: 1.25rem;
    }
    
    .results-header h3 {
        font-size: 1.1rem;
    }
    
    .evaluated-student-info {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
        border-radius: 4px;
    }
    
    #evaluated-student-name {
        font-size: 0.95rem;
    }
    
    .score-display {
        gap: 0.75rem;
    }
    
    .score-item {
        padding: 0.875rem;
        border-radius: 6px;
    }
    
    .score-label {
        font-size: 0.85rem;
        margin-bottom: 0.375rem;
    }
    
    .score-value {
        font-size: 1.25rem;
    }
    
    .score-value.grade {
        font-size: 1.75rem;
    }
    
    .progress-bar {
        height: 6px;
        border-radius: 3px;
    }
    
    .comments-section {
        margin-top: 1.25rem;
    }
    
    .comments-label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .comments-textarea {
        min-height: 100px;
        padding: 0.875rem;
        font-size: 0.85rem;
        border-radius: 6px;
    }
}

.results-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-header h3 {
    margin: 0;
    color: var(--gray-800);
    font-size: 1.25rem;
}

.evaluated-student-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.evaluated-student-info::before {
    content: "👤";
    font-size: 1.1em;
}

#evaluated-student-name {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1rem;
}

.results-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.score-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.score-label {
    font-weight: 500;
    color: var(--gray-700);
}

.score-value {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.score-value.grade {
    font-size: 1.5rem;
    color: var(--success-color);
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--gray-200);
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    transition: width 0.5s ease;
    border-radius: 6px;
}

/* Comments Section */
.comments-section {
    margin-top: 1rem;
}

.comments-label {
    display: block;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.comments-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    transition: var(--transition);
}

.comments-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 112, 209, 0.1);
}

.comments-textarea::placeholder {
    color: var(--gray-500);
}

/* Students Sidebar */
.students-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.students-sidebar.open {
    right: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.sidebar-header h3 {
    color: var(--gray-800);
    margin: 0;
}

.sidebar-content {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

.students-filter {
    margin-bottom: 1.5rem;
}

.students-filter input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 0.95rem;
}

.students-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.student-item {
    padding: 1rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    background: var(--white);
}

.student-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.student-item.evaluated {
    background: rgba(40, 167, 69, 0.05);
    border-color: var(--success-color);
}

.student-item.current {
    background: rgba(0, 112, 209, 0.1);
    border-color: var(--primary-color);
}

.student-name {
    font-weight: 500;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.student-status {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.student-status.evaluated {
    color: var(--success-color);
    font-weight: 500;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-content {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.modal-header h3 {
    margin: 0;
    color: var(--gray-800);
}

.modal-body {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

#rubrica-preview {
    overflow-x: auto;
}

#rubrica-preview table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

#rubrica-preview th,
#rubrica-preview td {
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    text-align: left;
    vertical-align: top;
}

#rubrica-preview th {
    background: var(--gray-100);
    font-weight: 600;
}

/* Estados vacíos */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--gray-500);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: var(--gray-600);
}

/* Responsive para animaciones */
@media (max-width: 1200px) {
    .main-content {
        flex-direction: column;
        gap: 2rem;
        padding: 1.5rem;
    }
    
    .main-content:not(.evaluation-active) .control-panel {
        margin: 0;
        transform: none;
        max-width: none;
    }
    
    .main-content.evaluation-active .control-panel {
        margin: 0;
        transform: none;
    }
    
    .evaluation-area {
        opacity: 1;
        transform: none;
    }
    
    .main-content.evaluation-active .evaluation-area {
        opacity: 1;
        transform: none;
    }
    
    /* Desactivar animaciones en móvil */
    .main-content:not(.evaluation-active) .control-panel,
    .main-content.evaluation-active .control-panel,
    .main-content.evaluation-active .evaluation-area {
        animation: none;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .student-info {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
    }
    
    .evaluation-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }
    
    .control-panel,
    .evaluation-area {
        padding: 1.5rem;
    }
    
    .student-info {
        padding: 1.5rem;
    }
    
    .rubrica-evaluation {
        padding: 1.5rem;
    }
    
    .results-panel {
        padding: 1.5rem;
    }
    
    .score-display {
        grid-template-columns: 1fr;
    }
    
    .students-sidebar {
        width: 100%;
        right: -100%;
        max-width: 350px;
    }
    
    .evaluation-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .quick-actions {
        flex-direction: column;
    }
    
    .results-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .evaluated-student-info {
        font-size: 0.9rem;
    }
    
    #evaluated-student-name {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .students-sidebar {
        width: 100%;
        right: -100%;
        max-width: 100%;
    }
    
    .sidebar-header {
        padding: 1rem;
    }
    
    .sidebar-header h3 {
        font-size: 1rem;
    }
    
    .sidebar-content {
        padding: 1rem;
    }
    
    .students-filter {
        margin-bottom: 1.25rem;
    }
    
    .students-filter input {
        padding: 1rem;
        font-size: 1rem;
        border-radius: 6px;
    }
    
    .students-list {
        gap: 0.5rem;
    }
    
    .student-item {
        padding: 0.875rem;
        border-radius: 6px;
        border-width: 1px;
    }
    
    .student-name {
        font-size: 0.9rem;
    }
    
    .student-status {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
        border-radius: 3px;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.evaluation-area {
    animation: fadeIn 0.5s ease;
}

.student-item {
    animation: fadeIn 0.3s ease;
}

/* Scrollbar personalizado */
.evaluation-table-container::-webkit-scrollbar,
.sidebar-content::-webkit-scrollbar,
.modal-body::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.evaluation-table-container::-webkit-scrollbar-track,
.sidebar-content::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 4px;
}

.evaluation-table-container::-webkit-scrollbar-thumb,
.sidebar-content::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 4px;
}

.evaluation-table-container::-webkit-scrollbar-thumb:hover,
.sidebar-content::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

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

/* ================================
   COMPATIBILIDAD CON TEMAS
   ================================ */

/* Tema Dark */
body.theme-dark {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #e0e0e0;
}

/* Header para tema dark */
body.theme-dark .app-header {
    background: rgba(26, 26, 46, 0.95);
    border-color: #505050;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

body.theme-dark .app-title {
    color: #64ffda;
}

body.theme-dark .app-title svg {
    color: #64ffda;
}

body.theme-dark .app-subtitle {
    color: rgba(255, 255, 255, 0.7);
}

body.theme-dark .control-panel,
body.theme-dark .evaluation-area,
body.theme-dark .students-sidebar {
    background: rgba(40, 40, 40, 0.95);
    border-color: #505050;
}

body.theme-dark .panel-section {
    background: rgba(50, 50, 50, 0.8);
    border-color: #606060;
}

body.theme-dark .section-title {
    color: #e0e0e0;
}

body.theme-dark .form-group label {
    color: #d0d0d0;
}

body.theme-dark .form-group select,
body.theme-dark .form-group input,
body.theme-dark .comments-textarea {
    background: rgba(60, 60, 60, 0.8);
    border-color: #707070;
    color: #e0e0e0;
}

body.theme-dark .add-course-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

body.theme-dark .add-course-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

body.theme-dark .evaluation-table {
    background: rgba(50, 50, 50, 0.9);
    border-color: #606060;
}

body.theme-dark .evaluation-table th,
body.theme-dark .evaluation-table td {
    border-color: #606060;
    color: #e0e0e0;
}

body.theme-dark .evaluation-table th {
    background: rgba(70, 70, 70, 0.9);
}

body.theme-dark .nivel-cell:hover {
    background: rgba(0, 112, 209, 0.2);
}

body.theme-dark .nivel-cell.selected {
    background: rgba(0, 112, 209, 0.8);
}

body.theme-dark .results-panel {
    background: rgba(40, 40, 40, 0.95);
    border-color: #505050;
}

body.theme-dark #evaluated-student-name {
    color: #64ffda;
}

body.theme-dark .evaluation-actions {
    background: rgba(40, 40, 40, 0.95);
    border-color: #505050;
}

body.theme-dark .modal-content {
    background: rgba(40, 40, 40, 0.95);
    border-color: #505050;
}

/* Tema Light */
body.theme-light {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    color: #333333;
}

/* Tema Rosa */
body.theme-rosa {
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%);
    color: #4a148c;
}

/* Header para tema rosa */
body.theme-rosa .app-header {
    background: rgba(252, 228, 236, 0.95);
    border-color: #f48fb1;
    box-shadow: 0 4px 20px rgba(244, 143, 177, 0.2);
}

body.theme-rosa .app-title {
    color: #ad1457;
}

body.theme-rosa .app-title svg {
    color: #ad1457;
}

body.theme-rosa .app-subtitle {
    color: #880e4f;
}

body.theme-rosa .control-panel,
body.theme-rosa .evaluation-area,
body.theme-rosa .students-sidebar {
    background: rgba(252, 228, 236, 0.9);
    border-color: #f48fb1;
}

body.theme-rosa .panel-section {
    background: rgba(248, 187, 208, 0.6);
    border-color: #f06292;
}

body.theme-rosa .btn-primary {
    background: #ad1457;
}

body.theme-rosa .btn-primary:hover {
    background: #880e4f;
}

body.theme-rosa .nivel-cell.selected {
    background: rgba(173, 20, 87, 0.8);
}

body.theme-rosa .results-panel {
    background: rgba(252, 228, 236, 0.9);
    border-color: #f48fb1;
}

body.theme-rosa #evaluated-student-name {
    color: #ad1457;
}

body.theme-rosa .evaluation-actions {
    background: rgba(252, 228, 236, 0.9);
    border-color: #f48fb1;
}

body.theme-rosa .add-course-btn {
    background: linear-gradient(135deg, #ad1457 0%, #880e4f 100%);
    color: white;
}

body.theme-rosa .add-course-btn:hover {
    background: linear-gradient(135deg, #880e4f 0%, #4a148c 100%);
}

/* Tema Neon */
body.theme-neon {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
    color: #00ffff;
}

/* Header para tema neon */
body.theme-neon .app-header {
    background: rgba(0, 0, 26, 0.95);
    border-color: #00ffff;
    box-shadow: 0 4px 20px rgba(0, 255, 255, 0.3), 0 0 30px rgba(0, 255, 255, 0.1);
}

body.theme-neon .app-title {
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

body.theme-neon .app-title svg {
    color: #00ffff;
    filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.5));
}

body.theme-neon .app-subtitle {
    color: #00e6e6;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}

body.theme-neon .control-panel,
body.theme-neon .evaluation-area,
body.theme-neon .students-sidebar {
    background: rgba(26, 26, 46, 0.9);
    border-color: #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

body.theme-neon .btn-primary {
    background: linear-gradient(45deg, #00ffff, #0080ff);
    color: #000000;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
}

body.theme-neon .btn-primary:hover {
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.6);
}

body.theme-neon .nivel-cell.selected {
    background: rgba(144, 164, 174, 0.2);
    border-color: #90a4ae;
}

body.theme-neon .results-panel {
    background: rgba(26, 26, 46, 0.9);
    border-color: #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

body.theme-neon #evaluated-student-name {
    color: #00ffff;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}

body.theme-neon .evaluation-actions {
    background: rgba(26, 26, 46, 0.9);
    border-color: #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

body.theme-neon .add-course-btn {
    background: linear-gradient(135deg, #00ffff 0%, #0080ff 100%);
    color: #000000;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
}

body.theme-neon .add-course-btn:hover {
    background: linear-gradient(135deg, #0080ff 0%, #0040ff 100%);
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.6);
}

/* ================================
   ESTILOS PARA EVALUACIÓN POR GRUPOS
   ================================ */

/* Información del grupo */
#group-info {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

#group-name {
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#group-name::before {
    content: "👥";
    font-size: 1.1em;
}

.group-members {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-start;
    align-items: flex-start;
}

.group-member {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    transition: var(--transition);
    min-width: 200px;
    max-width: 280px;
    flex: 0 1 auto;
}

.group-member:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.member-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.member-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.member-name {
    font-weight: 500;
    color: var(--gray-800);
    font-size: 0.9rem;
}

.member-email {
    font-size: 0.8rem;
    color: var(--gray-600);
}

.member-status {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    border-radius: 10px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.member-status.pending {
    background: rgba(255, 193, 7, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.member-status.evaluated {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(40, 167, 69, 0.3);
}

/* Selector de grupos */
#eval-grupo-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Indicador de evaluación grupal */
.group-evaluation-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(0, 112, 209, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(0, 112, 209, 0.2);
    border-radius: var(--border-radius);
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.group-evaluation-indicator::before {
    content: "👥";
}

/* Resumen de evaluación grupal */
.group-evaluation-summary {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-top: 1rem;
    box-shadow: var(--shadow-sm);
}

.group-evaluation-summary h4 {
    color: var(--primary-color);
    font-size: 1rem;
    margin: 0 0 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.group-evaluation-summary h4::before {
    content: "📊";
}

.group-summary-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-start;
    align-items: stretch;
}

.summary-item {
    text-align: center;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    min-width: 120px;
    max-width: 180px;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.summary-label {
    font-size: 0.8rem;
    color: var(--gray-600);
    margin-bottom: 0.25rem;
}

.summary-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Estados de carga para grupos */
.loading-groups {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--gray-600);
    font-style: italic;
}

.no-groups-available {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--gray-600);
    text-align: center;
}

.no-groups-available svg {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Responsive para evaluación por grupos */
@media (max-width: 768px) {
    .group-members {
        gap: 0.5rem;
        justify-content: center;
    }
    
    .group-member {
        padding: 0.4rem 0.6rem;
        gap: 0.4rem;
        min-width: 180px;
        max-width: 240px;
    }
    
    .member-avatar {
        width: 26px;
        height: 26px;
        font-size: 0.75rem;
    }
    
    .member-name {
        font-size: 0.8rem;
    }
    
    .member-email {
        font-size: 0.7rem;
    }
    
    .group-summary-grid {
        gap: 0.5rem;
        justify-content: center;
    }
    
    .summary-item {
        padding: 0.5rem;
        min-width: 100px;
        max-width: 140px;
    }
    
    #group-info {
        padding: 1.25rem;
        margin-bottom: 1.5rem;
        border-radius: 8px;
    }
    
    #group-name {
        font-size: 1.25rem;
        margin-bottom: 1rem;
}

    .group-members {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .group-member {
        padding: 1rem;
        border-radius: 8px;
        border-width: 2px;
    }
    
    .member-avatar {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .member-name {
        font-size: 0.95rem;
        font-weight: 600;
    }
    
    .member-email {
        font-size: 0.85rem;
    }
    
    .member-status {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
        border-radius: 4px;
    }
    
    .group-summary-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .summary-item {
        padding: 1rem;
        border-radius: 8px;
    }
    
    .summary-label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .summary-value {
        font-size: 1.25rem;
        font-weight: 700;
    }
}

@media (max-width: 480px) {
    .group-members {
        gap: 0.5rem;
    }
    
    .group-member {
        padding: 0.875rem;
        border-radius: 6px;
        border-width: 1px;
    }
    
    .member-avatar {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }
    
    .member-name {
        font-size: 0.9rem;
    }
    
    .member-email {
        font-size: 0.8rem;
    }
    
    .member-status {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
        border-radius: 3px;
    }
    
    .group-summary-grid {
        gap: 0.75rem;
    }
    
    .summary-item {
        padding: 0.875rem;
        border-radius: 6px;
    }
    
    .summary-label {
        font-size: 0.85rem;
        margin-bottom: 0.375rem;
    }
    
    .summary-value {
        font-size: 1.1rem;
    }
    
    #group-name {
        font-size: 1.1rem;
        margin-bottom: 0.875rem;
    }
}

/* Temas para evaluación por grupos */
body.theme-dark #group-info {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

body.theme-dark .group-member {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

body.theme-dark .group-member:hover {
    border-color: var(--primary-color);
}

body.theme-dark .member-name {
    color: var(--white);
}

body.theme-dark .member-email {
    color: rgba(255, 255, 255, 0.7);
}

body.theme-dark .group-evaluation-summary {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

body.theme-dark .summary-item {
    background: rgba(255, 255, 255, 0.08);
}

body.theme-rosa #group-name {
    color: #e91e63;
}

body.theme-rosa .member-avatar {
    background: #e91e63;
}

body.theme-rosa .group-evaluation-indicator {
    background: rgba(233, 30, 99, 0.1);
    color: #e91e63;
    border-color: rgba(233, 30, 99, 0.2);
}

body.theme-rosa .summary-value {
    color: #e91e63;
}

body.theme-neon #group-name {
    color: #90a4ae;
}

body.theme-neon .member-avatar {
    background: #90a4ae;
}

body.theme-neon .group-evaluation-indicator {
    background: rgba(144, 164, 174, 0.1);
    color: #90a4ae;
    border-color: rgba(144, 164, 174, 0.2);
}

body.theme-neon .summary-value {
    color: #90a4ae;
}

/* Estilos para selectores de conjunto y grupo específico */
#grupo-group,
#grupo-especifico-group {
    margin-top: 1rem;
}

#eval-conjunto-select,
#eval-grupo-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    background: var(--white);
    color: var(--gray-800);
    font-size: 0.9rem;
    transition: var(--transition);
}

#eval-conjunto-select:focus,
#eval-grupo-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 112, 209, 0.1);
}

#eval-conjunto-select:disabled,
#eval-grupo-select:disabled {
    background: var(--gray-100);
    color: var(--gray-500);
    cursor: not-allowed;
}

/* Estilos para temas oscuros */
body.theme-dark #eval-conjunto-select,
body.theme-dark #eval-grupo-select {
    background: var(--gray-800);
    color: var(--gray-200);
    border-color: var(--gray-600);
}

body.theme-dark #eval-conjunto-select:focus,
body.theme-dark #eval-grupo-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 112, 209, 0.2);
}

body.theme-dark #eval-conjunto-select:disabled,
body.theme-dark #eval-grupo-select:disabled {
    background: var(--gray-700);
    color: var(--gray-500);
}

/* Sección de acciones de evaluación */
.save-evaluation-section {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 2rem;
    text-align: center;
}

.save-evaluation-section button {
    background: var(--success-color);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.save-evaluation-section button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.save-evaluation-section button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Estilos para temas */
body.theme-dark .save-evaluation-section {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

body.theme-rosa .save-evaluation-section {
    background: rgba(233, 30, 99, 0.05);
    border-color: rgba(233, 30, 99, 0.1);
}

body.theme-neon .save-evaluation-section {
    background: rgba(144, 164, 174, 0.05);
    border-color: rgba(144, 164, 174, 0.1);
}

/* Optimizaciones para móviles */
@media (max-width: 768px) {
    .save-evaluation-section {
        padding: 1.25rem;
        margin-top: 1.5rem;
        border-radius: 8px;
    }
    
    .save-evaluation-section button {
        width: 100%;
        padding: 1.125rem;
        font-size: 1rem;
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .save-evaluation-section {
        padding: 1rem;
        margin-top: 1.25rem;
        border-radius: 6px;
    }
    
    .save-evaluation-section button {
        padding: 1rem;
        font-size: 0.95rem;
        border-radius: 6px;
    }
}

/* Animación de entrada para el panel de configuración */
@keyframes slideInFromCenter {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Animación de salida hacia la izquierda */
@keyframes slideToLeft {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-20px);
    }
}

/* Animación de entrada desde la derecha */
@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Aplicar animaciones */
.main-content:not(.evaluation-active) .control-panel {
    animation: slideInFromCenter 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-content.evaluation-active .control-panel {
    animation: slideToLeft 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    }

.main-content.evaluation-active .evaluation-area {
    animation: slideInFromRight 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== SISTEMA DE SESIONES ===== */

/* Modal de sesiones */
.modal-large {
    max-width: 800px;
    width: 90%;
}

.modal-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sessions-count {
    font-size: 0.9rem;
    color: var(--gray-600);
    font-weight: 500;
}

/* Contenedor de sesiones */
#sesiones-container {
    max-height: 60vh;
    overflow-y: auto;
    padding: 1rem 0;
}

/* Estado sin sesiones */
.no-sessions {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--gray-600);
}

.no-sessions-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-sessions h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.no-sessions p {
    font-size: 1rem;
    line-height: 1.5;
}

/* Tarjetas de sesión */
.session-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.session-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.session-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.session-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.session-date {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 0.25rem;
}

.session-id-display {
    font-size: 0.8rem;
    color: var(--gray-500);
    font-family: monospace;
    background: var(--gray-100);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
}

.session-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.session-status.pending {
    background: var(--warning-color);
    color: var(--gray-800);
}

.session-status.completed {
    background: var(--success-color);
    color: var(--white);
}

/* Detalles de sesión */
.session-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.session-detail {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.session-detail-label {
    font-size: 0.8rem;
    color: var(--gray-600);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.session-detail-value {
    font-size: 1rem;
    color: var(--gray-800);
    font-weight: 500;
}

/* Acciones de sesión */
.session-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.session-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.session-btn.resume {
    background: var(--info-color);
    color: var(--white);
}

.session-btn.resume:hover {
    background: #138496;
    transform: translateY(-1px);
}

.session-btn.view {
    background: var(--primary-color);
    color: var(--white);
}

.session-btn.view:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.session-btn.delete {
    background: var(--danger-color);
    color: var(--white);
}

.session-btn.delete:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* Botones de sesión en evaluación */
#guardar-sesion,
#siguiente-estudiante-sesion {
    margin-left: 0.5rem;
}

#guardar-sesion {
    background: var(--warning-color);
    color: var(--gray-800);
    border: 1px solid var(--warning-color);
}

#guardar-sesion:hover:not(:disabled) {
    background: #e0a800;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

#siguiente-estudiante-sesion {
    background: var(--info-color);
    color: var(--white);
    border: 1px solid var(--info-color);
}

#siguiente-estudiante-sesion:hover:not(:disabled) {
    background: #138496;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

/* Responsive para sesiones */
@media (max-width: 768px) {
    .modal-large {
        width: 95%;
        margin: 1rem;
    }
    
    .session-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .session-details {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .session-actions {
        flex-direction: column;
    }
    
    .session-btn {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .modal-large {
        width: 98%;
        margin: 0.5rem;
    }
    
    .session-card {
        padding: 1rem;
    }
    
    .session-title {
        font-size: 1.1rem;
    }
    
    .session-details {
        gap: 0.5rem;
    }
    
    .session-detail-label {
        font-size: 0.75rem;
    }
    
    .session-detail-value {
        font-size: 0.9rem;
    }
}

/* Temas para sesiones */
body.theme-dark .session-card {
    background: var(--gray-800);
    border-color: var(--gray-700);
}

body.theme-dark .session-title {
    color: var(--gray-200);
}

body.theme-dark .session-date {
    color: var(--gray-400);
}

body.theme-dark .session-id-display {
    background: var(--gray-700);
    color: var(--gray-300);
}

body.theme-dark .session-detail-label {
    color: var(--gray-400);
}

body.theme-dark .session-detail-value {
    color: var(--gray-200);
}

body.theme-rosa .session-card {
    border-color: #ff69b4;
}

body.theme-rosa .session-status.pending {
    background: #ff69b4;
    color: var(--white);
}

body.theme-neon .session-card {
    border-color: #00ff41;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.2);
}

body.theme-neon .session-card:hover {
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.4);
}