/**
 * ESTILOS PARA SISTEMA DE GESTIÓN DE CLASES
 * 
 * Incluye estilos para:
 * - Gestión de clases (admin)
 * - Panel del profesor
 * - Reporte de horas
 */

/* ========================================
   GESTIÓN DE CLASES - GENERAL
   ======================================== */

.gestion-clases-completa {
    padding: 20px;
}

.clases-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.clases-header h2 {
    margin: 0;
    color: #333;
    font-size: 24px;
}

.vista-toggle {
    display: flex;
    gap: 10px;
}

.filtros-clases {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filtros-clases select,
.filtros-clases input {
    flex: 1;
    min-width: 150px;
}

/* ========================================
   TABLA DE CLASES
   ======================================== */

.tabla-clases-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: #f3f4f6;
}

.data-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.data-table tbody tr:hover {
    background: #f9fafb;
}

/* ========================================
   CRONOGRAMA VISUAL
   ======================================== */

.cronograma-visual {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dia-cronograma {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dia-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e7eb;
}

.dia-header h3 {
    margin: 0;
    color: #111827;
    font-size: 18px;
    text-transform: capitalize;
}

.clases-del-dia {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.tarjeta-clase {
    background: #f9fafb;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.tarjeta-clase:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.clase-hora {
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.clase-info strong {
    display: block;
    color: #111827;
    margin-bottom: 5px;
}

.clase-tema {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 8px;
}

.clase-profesor {
    color: #374151;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-meet-small {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #10b981;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.btn-meet-small:hover {
    background: #059669;
    transform: scale(1.05);
}

/* ========================================
   PANEL DEL PROFESOR
   ======================================== */

.profesor-panel {
    padding: 20px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.panel-header h2 {
    margin: 0;
    color: #333;
    font-size: 24px;
}

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

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

.card-stat {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-info h3 {
    margin: 0 0 5px 0;
    font-size: 28px;
    color: #111827;
}

.stat-info p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.dia-clases {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.lista-clases {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tarjeta-clase-profesor {
    background: #f9fafb;
    border-radius: 8px;
    padding: 20px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px;
    align-items: start;
}

.clase-hora-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hora-badge {
    background: white;
    padding: 10px 15px;
    border-radius: 6px;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.hora-hoy {
    background: #fef3c7;
    color: #92400e;
    border: 2px solid #fbbf24;
}

.clase-contenido h4 {
    margin: 0 0 10px 0;
    color: #111827;
    font-size: 18px;
}

.clase-contenido .tema {
    color: #374151;
    margin: 5px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.clase-contenido .descripcion {
    color: #6b7280;
    font-size: 14px;
    margin: 10px 0;
}

.clase-meta {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    font-size: 13px;
    color: #6b7280;
}

.horas-badge {
    background: #d1fae5;
    color: #065f46;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.clase-acciones {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 200px;
}

.btn-meet {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    text-decoration: none;
    color: white;
}

.btn-meet:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.registro-btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.entrada-registrada {
    background: #d1fae5;
    color: #065f46;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
}

.clase-completada {
    background: #d1fae5;
    color: #065f46;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.alert-sm {
    padding: 8px 12px;
    font-size: 13px;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fbbf24;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ========================================
   REPORTE DE HORAS
   ======================================== */

.reporte-horas {
    padding: 20px;
}

.reporte-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.periodo-selector {
    display: flex;
    gap: 10px;
    align-items: center;
}

.periodo-selector label {
    font-weight: 600;
    color: #374151;
}

.resumen-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

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

.card-stat-large {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
}

.card-stat-large h3 {
    margin: 0 0 10px 0;
    font-size: 36px;
}

.card-stat-large p {
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
}

.detalle-clases {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.detalle-clases h3 {
    margin: 0 0 20px 0;
    color: #111827;
}

.acciones-reporte {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* ========================================
   TABS
   ======================================== */

.tabs-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.tabs-header {
    display: flex;
    border-bottom: 2px solid #e5e7eb;
    background: #f9fafb;
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.tab-btn.active {
    color: #667eea;
    border-bottom: 3px solid #667eea;
    background: white;
}

.tabs-content {
    padding: 20px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.stats-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
}

.stat-item {
    text-align: center;
}

.stat-item strong {
    display: block;
    font-size: 24px;
    color: #111827;
    margin-bottom: 5px;
}

.stat-item span {
    color: #6b7280;
    font-size: 14px;
}

/* ========================================
   MODALES
   ======================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-large {
    max-width: 900px;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.3s;
}

.close-modal:hover {
    background: #f3f4f6;
    color: #374151;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.detalle-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.detalle-item {
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
}

.detalle-item.full-width {
    grid-column: 1 / -1;
}

.detalle-item label {
    display: block;
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.detalle-item strong {
    color: #111827;
    font-size: 15px;
}

.meet-section {
    background: #ecfdf5;
    border: 1px solid #10b981;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.meet-section h4 {
    margin: 0 0 15px 0;
    color: #065f46;
    display: flex;
    align-items: center;
    gap: 8px;
}

.meet-link-container {
    display: flex;
    gap: 10px;
}

.meet-link-container input {
    flex: 1;
}

.registro-profesor,
.registro-info {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.registro-profesor h4,
.registro-info h4 {
    margin: 0 0 15px 0;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.registro-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.registro-item {
    background: white;
    padding: 10px;
    border-radius: 6px;
}

.registro-item label {
    display: block;
    color: #6b7280;
    font-size: 12px;
    margin-bottom: 5px;
}

.registro-item strong {
    color: #111827;
    font-size: 16px;
}

.estudiantes-curso,
.estudiantes-lista {
    margin-top: 20px;
}

.estudiante-card {
    background: #f9fafb;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.estudiante-avatar {
    width: 50px;
    height: 50px;
    background: #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #6b7280;
}

.estudiante-info {
    flex: 1;
}

.estudiante-info h4 {
    margin: 0 0 5px 0;
    color: #111827;
}

.estudiante-info p {
    margin: 3px 0;
    color: #6b7280;
    font-size: 14px;
}

.whatsapp-link {
    color: #25D366;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.whatsapp-link:hover {
    text-decoration: underline;
}

.resumen-modal {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    justify-content: center;
}

.stat-box {
    background: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    min-width: 120px;
}

.stat-box strong {
    display: block;
    font-size: 24px;
    color: #111827;
    margin-bottom: 5px;
}

.stat-box span {
    color: #6b7280;
    font-size: 14px;
}

/* ========================================
   EMPTY STATE
   ======================================== */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}

.empty-state p {
    margin: 15px 0 0 0;
    font-size: 16px;
}

/* ========================================
   BADGES
   ======================================== */

.badge {
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.badge-secondary {
    background: #f3f4f6;
    color: #374151;
}

/* ========================================
   BOTONES
   ======================================== */

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 14px;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-warning {
    background: #f59e0b;
    color: white;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-info {
    background: #06b6d4;
    color: white;
}

.btn-info:hover {
    background: #0891b2;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* ========================================
   FORMULARIOS
   ======================================== */

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
}

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

.form-group {
    margin-bottom: 15px;
}

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

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

.form-text {
    font-size: 12px;
    color: #6b7280;
    margin-top: 5px;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .clases-header,
    .panel-header,
    .reporte-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .vista-toggle,
    .header-actions {
        width: 100%;
    }
    
    .tarjeta-clase-profesor {
        grid-template-columns: 1fr;
    }
    
    .clase-acciones {
        min-width: auto;
    }
    
    .detalle-grid {
        grid-template-columns: 1fr;
    }
    
    .resumen-cards,
    .resumen-general {
        grid-template-columns: 1fr;
    }
    
    .tabs-header {
        flex-direction: column;
    }
    
    .tab-btn {
        border-bottom: 1px solid #e5e7eb;
    }
    
    .tab-btn.active {
        border-bottom: 3px solid #667eea;
    }
}

@media print {
    .clases-header,
    .filtros-clases,
    .acciones-reporte,
    .clase-acciones,
    .btn {
        display: none !important;
    }
    
    .modal-overlay {
        position: static;
        background: none;
    }
    
    .modal-content {
        box-shadow: none;
        max-width: 100%;
    }
}
