/* src/css/notas.css */
.curso-card-sm,
.alumno-card-sm {
    border: 1px solid #ddd;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.curso-actions,
.alumno-actions {
    display: flex;
    gap: 10px;
}

.lista-cursos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.btn-circular {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.curso-card-sm {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.curso-card-sm:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    filter: brightness(1.1);
    transform: scale(1.05);
}

.form-group-modal {
    margin-bottom: 15px;
    text-align: left;
}

.form-group-modal label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
    font-size: 14px;
}

.evaluacion-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    background-color: #f8f9fa;
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
}

.card-body {
    padding: 15px;
}

.card-footer {
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-top: 1px solid #ddd;
    text-align: right;
}

.nota-alumno-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.nota-alumno-row:last-child {
    border-bottom: none;
}

.nota-input {
    width: 60px;
    padding: 5px;
    text-align: center;
}

/* Nueva Vista: Agregar Alumnos */
.agregar-alumnos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    color: white;
}

.agregar-alumnos-header h2 {
    margin: 0;
    font-size: 24px;
}

#curso-nombre-actual {
    font-weight: bold;
    color: #ffd700;
}

.agregar-alumnos-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Crear Alumno Inline */
.crear-alumno-inline {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.inline-input {
    flex: 1;
    min-width: 150px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.btn-success {
    background: linear-gradient(135deg, #00b09b 0%, #96c93d 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 176, 155, 0.3);
}

/* Lista de Alumnos Disponibles */
.alumnos-disponibles-lista {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}

.alumnos-disponibles-toolbar {
    padding: 10px 15px;
    display: flex;
    gap: 10px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 10px;
    border-radius: 8px 8px 0 0;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.alumnos-toolbar-left {
    display: flex;
    gap: 10px;
}

.search-container-simple {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border-radius: 6px;
    padding: 0 10px;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.search-container-simple:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-container-simple i {
    color: #999;
    font-size: 14px;
}

.search-container-simple:focus-within i {
    color: #667eea;
}

.search-container-simple input {
    background: transparent;
    border: none;
    color: #333;
    padding: 8px;
    font-size: 14px;
    outline: none;
    width: 200px;
}

.alumno-checkbox-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: all 0.2s ease;
}

.alumno-checkbox-item:hover {
    background-color: #f0f0f0;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.2);
}

.alumno-checkbox-item input[type="checkbox"] {
    margin-right: 12px;
    cursor: pointer;
    width: 20px;
    height: 20px;
    accent-color: #667eea;
}

.alumno-checkbox-item label {
    cursor: pointer;
    flex: 1;
    font-size: 15px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.alumno-checkbox-item.checked {
    background: linear-gradient(135deg, #667eea20 0%, #764ba220 100%);
    border-color: #667eea;
    border-width: 2px;
}

/* Acciones de Agregar Alumnos */
.acciones-agregar-alumnos {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding: 20px;
}

.acciones-agregar-alumnos button {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .agregar-alumnos-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .crear-alumno-inline {
        flex-direction: column;
    }

    .inline-input {
        width: 100%;
    }

    .alumnos-disponibles-lista {
        grid-template-columns: 1fr;
    }

    .acciones-agregar-alumnos {
        flex-direction: column;
    }

    .acciones-agregar-alumnos button {
        width: 100%;
    }
}

/* ========== MODERN UI STYLES ========== */

/* Modern Cards */
.modern-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 20px;
    background: white;
    transition: box-shadow 0.3s ease;
}

.modern-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.card-header-modern {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header-modern h3 {
    margin: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.attendance-header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.search-container-modern {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0 12px;
    border: 2px solid white;
    transition: all 0.3s ease;
}

.search-container-modern:focus-within {
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.search-container-modern i {
    color: white;
    font-size: 14px;
}

.search-container-modern:focus-within i {
    color: #667eea;
}

.search-container-modern input {
    background: transparent;
    border: none;
    color: white;
    padding: 10px 8px;
    font-size: 14px;
    outline: none;
    width: 180px;
}

.search-container-modern:focus-within input {
    color: #333;
}

.search-container-modern input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-container-modern:focus-within input::placeholder {
    color: #999;
}

.card-footer-modern {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

/* Modern Form */
.modern-form {
    padding: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

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

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.form-group input,
.form-group select {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Date Input Modern */
.date-input-modern {
    padding: 12px 16px;
    border: 2px solid white;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 500;
}

.date-input-modern:focus {
    outline: none;
    background: white;
    color: #333;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.date-input-modern::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

.date-input-modern:focus::-webkit-calendar-picker-indicator {
    filter: invert(0);
}

/* Attendance Grid */
.attendance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    padding: 15px;
}

@media (max-width: 480px) {
    .attendance-grid {
        grid-template-columns: 1fr;
        padding: 10px;
        gap: 10px;
    }
}

.attendance-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: #f9f9f9;
    transition: all 0.3s ease;
}

.attendance-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.attendance-name {
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.attendance-buttons {
    display: flex;
    gap: 8px;
}

.btn-asistencia {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.2s ease;
    background: white;
    color: #666;
}

.btn-asistencia:hover {
    transform: translateY(-2px);
}

/* Presente - Verde */
.btn-asistencia-p:hover,
.btn-asistencia-p.active {
    background-color: #00b09b;
    border-color: #00b09b;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 176, 155, 0.3);
}

/* Ausente - Rojo */
.btn-asistencia-a:hover,
.btn-asistencia-a.active {
    background-color: #ff5f6d;
    border-color: #ff5f6d;
    color: white;
    box-shadow: 0 4px 10px rgba(255, 95, 109, 0.3);
}

/* Tardanza - Amarillo/Ambar */
.btn-asistencia-t:hover,
.btn-asistencia-t.active {
    background-color: #f1c40f;
    border-color: #f1c40f;
    color: white;
    box-shadow: 0 4px 10px rgba(241, 196, 15, 0.3);
}

/* Estado de la fila según selección */
.attendance-item.selected-p {
    border-color: #00b09b;
    background-color: #00b09b05;
}

.attendance-item.selected-a {
    border-color: #ff5f6d;
    background-color: #ff5f6d05;
}

.attendance-item.selected-t {
    border-color: #f1c40f;
    background-color: #f1c40f05;
}

/* Evaluaciones Container */
.evaluaciones-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0 20px 20px 20px;
}

.evaluacion-card-modern {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    background: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.evaluacion-card-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.evaluacion-header {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.evaluacion-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.evaluacion-info {
    display: flex;
    gap: 15px;
    font-size: 13px;
    opacity: 0.9;
}

.evaluacion-body {
    padding: 20px;
}

.notas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.nota-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    transition: all 0.2s ease;
}

.nota-item:hover {
    background: #e9ecef;
    transform: translateX(3px);
}

.nota-item-name {
    font-weight: 500;
    color: #333;
}

.nota-item-input {
    width: 60px;
    padding: 6px 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    transition: border-color 0.3s ease;
}

.nota-item-input:focus {
    outline: none;
    border-color: #667eea;
}

/* Large Buttons */
.btn-large {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
}

.btn-success {
    background: linear-gradient(135deg, #00b09b 0%, #96c93d 100%);
    color: white;
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #009688 0%, #8bc34a 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 176, 155, 0.3);
}

/* Edit Button in Student Cards */
.btn-edit-alumno {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    transition: all 0.2s ease;
    font-size: 16px;
    margin-left: 8px;
}

.btn-edit-alumno:hover {
    background: #667eea;
    color: white;
    transform: scale(1.1);
}

.alumno-checkbox-item {
    position: relative;
}

.alumno-checkbox-item-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content-small {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content-small h3 {
    margin-top: 0;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-content-small input[type="text"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.modal-content-small input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.modal-actions-right {
    display: flex;
    gap: 10px;
}

/* Danger Button */
.btn-danger {
    background: linear-gradient(135deg, #ff5f6d 0%, #ffc371 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #ff4757 0%, #ffb142 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 95, 109, 0.3);
}

/* Responsive for Modern UI */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .attendance-grid {
        grid-template-columns: 1fr;
    }

    .notas-grid {
        grid-template-columns: 1fr;
    }

    .card-header-modern {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 15px;
    }

    .date-input-modern {
        width: 100%;
    }

    .attendance-header-actions {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .search-container-modern {
        width: 100%;
    }

    .search-container-modern input {
        width: 100%;
    }

    .attendance-item {
        padding: 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .attendance-buttons {
        width: 100%;
        justify-content: space-between;
    }
}

/* Badges for Evaluations */
.badge {
    display: inline-block;
    padding: 0.25em 0.6em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
    margin-right: 5px;
    text-transform: capitalize;
}

.badge-info {
    color: #fff;
    background-color: #17a2b8;
}

.badge-secondary {
    color: #fff;
    background-color: #6c757d;
}

.eval-info h4 {
    margin-bottom: 5px;
}