/* ===================================
   STUDENTS.CSS - Estilos de Estudiantes
   =================================== */

/* -------------------------
   Header de Estudiantes
   ------------------------- */

.students-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
}

.students-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-add-student {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-add-student:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.4);
}

/* -------------------------
   Controles de Estudiantes
   ------------------------- */

.students-controls {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.students-controls .row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -15px;
    margin-right: -15px;
    gap: 16px; /* Agregar separación entre controles */
}

.students-controls .col-md-6,
.students-controls .col-md-3 {
    position: relative;
    padding-left: 15px;
    padding-right: 15px;
    margin-bottom: 16px; /* Separación vertical para móviles */
}

.students-search {
    position: relative;
}

.students-search input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.students-search input:focus {
    outline: none;
    border-color: #48bb78;
    box-shadow: 0 0 0 3px rgba(72, 187, 120, 0.1);
    background: white;
}

.students-search::before {
    content: "🔍";
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    z-index: 2;
}

.filter-select {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
}

.filter-select:focus {
    outline: none;
    border-color: #48bb78;
    box-shadow: 0 0 0 3px rgba(72, 187, 120, 0.1);
}

/* -------------------------
   Tabla de Estudiantes
   ------------------------- */

.student-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    font-size: 1.4rem;
    box-shadow: 0 2px 8px rgba(72, 187, 120, 0.3);
}

.student-name {
    font-weight: 600;
    color: #1a202c;
    line-height: 1.3;
}

.student-name strong {
    font-size: 0.95rem;
    color: #2d3748;
}

.student-name small {
    font-weight: 500;
    font-size: 0.8rem;
    color: #718096;
    display: block;
    margin-top: 4px;
    background: #edf2f7;
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-block;
}

.badge-level {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(66, 153, 225, 0.2);
}

.badge-course {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(237, 137, 54, 0.2);
}

.attendance-rate {
    display: flex;
    align-items: center;
    gap: 8px;
}

.attendance-percentage {
    font-weight: 700;
    font-size: 0.9rem;
}

.attendance-percentage.high {
    color: #38a169;
}

.attendance-percentage.medium {
    color: #ed8936;
}

.attendance-percentage.low {
    color: #e53e3e;
}

.attendance-bar {
    width: 60px;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.attendance-progress {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.attendance-progress.high {
    background: linear-gradient(90deg, #48bb78, #38a169);
}

.attendance-progress.medium {
    background: linear-gradient(90deg, #ed8936, #dd6b20);
}

.attendance-progress.low {
    background: linear-gradient(90deg, #f56565, #e53e3e);
}

/* Responsive para estudiantes */
@media (max-width: 768px) {
    .students-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .students-controls {
        padding: 16px;
    }
    
    .students-controls .row {
        flex-direction: column;
        gap: 12px; /* Separación en móviles */
        margin-left: 0;
        margin-right: 0;
    }
    
    .students-controls .col-md-6,
    .students-controls .col-md-3 {
        width: 100%;
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
        margin-bottom: 12px;
    }
    
    .btn-add-student {
        width: 100%;
        justify-content: center;
    }
    
    .student-avatar {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* Mejorar espaciado de los controles en desktop */
@media (min-width: 769px) {
    .students-controls .row {
        align-items: center;
        justify-content: flex-start;
    }
    
    .students-controls .col-md-6 {
        flex: 0 0 45%;
        max-width: 45%;
    }
    
    .students-controls .col-md-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
}