/**
 * Sistema de Gestión Académica - Estilos CSS
 * Diseño moderno, responsivo y profesional
 * Colores: Rojo #DC2626, Azul Marino #1E3A8A, Dorado #D4AF37
 */

/* ===== RESET Y VARIABLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #DC2626;
    --color-secondary: #1E3A8A;
    --color-accent: #D4AF37;
    --color-dark: #1F2937;
    --color-light: #F9FAFB;
    --color-white: #FFFFFF;
    --color-gray: #6B7280;
    --color-border: #E5E7EB;
    --color-success: #10B981;
    --color-warning: #F59E0B;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: var(--color-dark);
    line-height: 1.6;
}

/* ===== CONTENEDOR PRINCIPAL ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.container-fluid {
    width: 100%;
    padding: 20px;
}

/* ===== PÁGINA DE LOGIN ===== */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    background: var(--color-white);
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    max-width: 400px;
    width: 100%;
}

.login-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: var(--color-white);
    padding: 40px 30px;
    text-align: center;
}

.login-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 700;
}

.login-header p {
    opacity: 0.9;
    font-size: 14px;
}

.login-body {
    padding: 40px 30px;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--color-dark);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: var(--color-light);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    background: var(--color-white);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-control.error {
    border-color: var(--color-primary);
}

.error-message {
    color: var(--color-primary);
    font-size: 13px;
    margin-top: 6px;
    display: block;
}

/* ===== BOTONES ===== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

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

.btn-primary:hover {
    background: #B91C1C;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover {
    background: #1E40AF;
    transform: translateY(-2px);
}

.btn-accent {
    background: var(--color-accent);
    color: var(--color-dark);
}

.btn-accent:hover {
    background: #B8941F;
}

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

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

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

/* ===== HEADER/NAVEGACIÓN ===== */
.navbar {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%);
    color: var(--color-white);
    padding: 16px 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-white);
    text-decoration: none;
}

.navbar-brand span {
    color: var(--color-accent);
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.navbar-user {
    font-size: 14px;
    opacity: 0.9;
}

.navbar-logout {
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: var(--color-white);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.navbar-logout:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ===== DASHBOARD ===== */
.dashboard {
    padding: 40px 20px;
}

.dashboard-header {
    margin-bottom: 40px;
}

.dashboard-title {
    font-size: 32px;
    color: var(--color-dark);
    margin-bottom: 8px;
}

.dashboard-subtitle {
    color: var(--color-gray);
    font-size: 16px;
}

/* Cards de estadísticas */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--color-white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border-left: 4px solid var(--color-primary);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card.secondary {
    border-left-color: var(--color-secondary);
}

.stat-card.accent {
    border-left-color: var(--color-accent);
}

.stat-card.success {
    border-left-color: var(--color-success);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 24px;
}

.stat-icon.primary {
    background: rgba(220, 38, 38, 0.1);
    color: var(--color-primary);
}

.stat-icon.secondary {
    background: rgba(30, 58, 138, 0.1);
    color: var(--color-secondary);
}

.stat-icon.accent {
    background: rgba(212, 175, 55, 0.1);
    color: var(--color-accent);
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 4px;
}

.stat-label {
    color: var(--color-gray);
    font-size: 14px;
}

/* ===== TARJETAS GENÉRICAS ===== */
.card {
    background: var(--color-white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-dark);
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--color-border);
    background: var(--color-light);
}

/* ===== TABLAS ===== */
.table-responsive {
    overflow-x: auto;
    margin: 20px 0;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-white);
}

.table th {
    background: var(--color-secondary);
    color: var(--color-white);
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

.table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--color-border);
    font-size: 14px;
}

.table tbody tr:hover {
    background: var(--color-light);
}

.table-actions {
    display: flex;
    gap: 8px;
}

/* ===== FORMULARIOS ===== */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    justify-content: flex-end;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* ===== ALERTAS ===== */
.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: #D1FAE5;
    color: #065F46;
    border-left: 4px solid var(--color-success);
}

.alert-error {
    background: #FEE2E2;
    color: #991B1B;
    border-left: 4px solid var(--color-primary);
}

.alert-warning {
    background: #FEF3C7;
    color: #92400E;
    border-left: 4px solid var(--color-warning);
}

.alert-info {
    background: #DBEAFE;
    color: #1E40AF;
    border-left: 4px solid var(--color-secondary);
}

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #D1FAE5;
    color: #065F46;
}

.badge-danger {
    background: #FEE2E2;
    color: #991B1B;
}

.badge-warning {
    background: #FEF3C7;
    color: #92400E;
}

.badge-info {
    background: #DBEAFE;
    color: #1E40AF;
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--color-white);
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--color-gray);
}

.modal-body {
    padding: 24px;
}

/* ===== FOTO DE ALUMNO ===== */
.alumno-foto {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-border);
}

.alumno-foto-grande {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    object-fit: cover;
    border: 3px solid var(--color-primary);
}

/* ===== LISTA DE ASISTENCIA ===== */
.asistencia-item {
    background: var(--color-white);
    border: 2px solid var(--color-border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
}

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

.asistencia-opciones {
    display: flex;
    gap: 16px;
    margin-left: auto;
}

.radio-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.radio-group input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.radio-group label {
    cursor: pointer;
    font-size: 14px;
}

/* ===== SISTEMA DE CALIFICACIONES ===== */
.unidad-container {
    background: var(--color-light);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    border: 2px solid var(--color-border);
}

.unidad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-border);
}

.actividad-item {
    background: var(--color-white);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calificacion-input {
    width: 80px;
    padding: 6px 10px;
    border: 2px solid var(--color-border);
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
}

.promedio-badge {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-warning) 100%);
    color: var(--color-white);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 16px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .navbar-content {
        flex-direction: column;
        gap: 16px;
    }
    
    .navbar-menu {
        width: 100%;
        justify-content: space-between;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .dashboard-title {
        font-size: 24px;
    }
    
    .table-responsive {
        font-size: 12px;
    }
    
    .table th,
    .table td {
        padding: 10px 8px;
    }
    
    .asistencia-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .asistencia-opciones {
        width: 100%;
        flex-direction: column;
        gap: 8px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .btn {
        font-size: 13px;
        padding: 10px 16px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .modal-content {
        width: 95%;
    }
}

/* ===== UTILIDADES ===== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-2 {
    margin-top: 16px;
}

.mb-2 {
    margin-bottom: 16px;
}

.p-2 {
    padding: 16px;
}

.flex {
    display: flex;
}

.flex-between {
    justify-content: space-between;
}

.flex-center {
    justify-content: center;
    align-items: center;
}

.gap-2 {
    gap: 16px;
}

.hidden {
    display: none;
}

/* ===== LOADER ===== */
.loader {
    border: 4px solid var(--color-light);
    border-top: 4px solid var(--color-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.table-actions {
    min-width: 350px;
}

.actions-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.actions-row:last-child {
    margin-bottom: 0;
}

.actions-row .btn {
    flex: 0 1 auto;
    white-space: nowrap;
}


     .grupo-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 30px;
            border-radius: 10px;
            margin-bottom: 30px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        }

        .grupo-header h1 {
            margin: 0 0 10px 0;
            font-size: 2em;
        }


 .grupo-detalle-container {
            max-width: 900px;
            margin: 20px auto;
            padding: 20px;
        }
.grupo-info {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            margin-top: 20px;
        }

        .info-item {
            background: rgba(255,255,255,0.2);
            padding: 15px;
            border-radius: 8px;
        }

        .info-label {
            font-size: 0.9em;
            opacity: 0.9;
            margin-bottom: 5px;
        }

        .info-value {
            font-size: 1.3em;
            font-weight: bold;
        }

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

        .accion-card {
            background: white;
            border-radius: 10px;
            padding: 25px;
            text-align: center;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            transition: transform 0.2s, box-shadow 0.2s;
            border: 2px solid transparent;
        }

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

        .accion-card.asistencia {
            border-color: #3b82f6;
        }

        .accion-card.calificaciones {
            border-color: #8b5cf6;
        }

        .accion-card.reportes {
            border-color: #10b981;
        }

        .accion-icon {
            font-size: 3em;
            margin-bottom: 15px;
        }

        .accion-card h3 {
            margin: 0 0 10px 0;
            font-size: 1.3em;
        }

        .accion-card p {
            color: #666;
            margin-bottom: 20px;
            font-size: 0.95em;
        }
.acciones-secundarias {
            background: white;
            border-radius: 10px;
            padding: 20px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .acciones-secundarias h3 {
            margin-top: 0;
            color: #333;
            border-bottom: 2px solid #e5e7eb;
            padding-bottom: 10px;
        }

        .btn-list {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 15px;
        }

        .btn-small {
            padding: 8px 16px;
            font-size: 0.9em;
        }

.aulaflip-visit-badge{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  padding:.45rem .75rem;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  font-size:.95rem;
}

.aulaflip-visit-badge .dot{
  width:.55rem;height:.55rem;border-radius:50%;
  background:#0ea5e9;
}

.aulaflip-visit-badge .label{opacity:.75;}
.aulaflip-visit-badge .value{font-weight:800;}
.aulaflip-visit-badge .sep{opacity:.35;}
.aulaflip-visit-badge .today{opacity:.85;}



