/* 
 * Sistema de Gestión Escolar - Estilos con Bootstrap 5
 * Este archivo complementa Bootstrap con estilos personalizados
 */

:root {
    --primary: #227829;
    --secondary: #93e356;
    --success: #4caf50;
    --danger: #f44336;
    --warning: #ffc107;
    --info: #21f37c;
    --light: #f8faf8;
    --dark: #333;
}

/* Sobrescribir variables de Bootstrap */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 30%, var(--secondary) 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #97F16F 0%, #93e356 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Gradientes para cards */
.gradient-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.gradient-success {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
}

.gradient-info {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
}

.gradient-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
}

/* Cards mejorados */
.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    padding: 20px 25px;
    font-weight: 600;
}

.card-body {
    padding: 25px;
}

/* Stat cards */
.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.stat-card.highlight {
    border-left-color: var(--warning);
    background: linear-gradient(135deg, #fff8e1 0%, #ffffff 100%);
}

.stat-icon {
    font-size: 3em;
    opacity: 0.3;
}

.stat-value {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--primary);
    margin: 10px 0;
}

.stat-label {
    color: #666;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Navbar personalizado */
.navbar-custom {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 15px 0;
}

.navbar-custom .navbar-brand {
    color: white;
    font-weight: bold;
    font-size: 1.5em;
}

.navbar-custom .nav-link {
    color: rgba(255,255,255,0.9);
    margin: 0 10px;
}

.navbar-custom .nav-link:hover {
    color: white;
}

/* Botones personalizados */
.btn {
    border-radius: 10px;
    padding: 10px 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

.btn-success {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    border: none;
}

.btn-info {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    border: none;
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    border: none;
    color: #333;
}

.btn-secondary {
    background: #6c757d;
    border: none;
}

/* Tablas */
.table {
    background: white;
    border-radius: 15px;
    overflow: hidden;
}

.table thead {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.table thead th {
    border: none;
    padding: 15px;
    font-weight: 600;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background: #f8f9ff;
    transform: scale(1.01);
}

.table tbody td {
    padding: 15px;
    vertical-align: middle;
}

/* Badges personalizados */
.badge {
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 500;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.status-activo {
    background: #d4edda;
    color: #155724;
}

.status-inactivo {
    background: #f8d7da;
    color: #721c24;
}

/* Grades/Calificaciones */
.grade-badge {
    padding: 8px 15px;
    border-radius: 10px;
    font-weight: bold;
    display: inline-block;
    min-width: 60px;
    text-align: center;
}

.grade-pass {
    background: #d4edda;
    color: #155724;
    border: 2px solid #4caf50;
}

.grade-fail {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f44336;
}

.grade-pending {
    background: #fff3cd;
    color: #856404;
}

/* Forms mejorados */
.form-control, .form-select {
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

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

/* Alerts mejorados */
.alert {
    border-radius: 15px;
    border: none;
    padding: 20px 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
}

/* Page header */
.page-header {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.page-header h1 {
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 10px;
}

.page-header .subtitle {
    color: #666;
    font-size: 1.1em;
}

/* Login page específico */
.login-page {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    max-width: 450px;
    width: 100%;
}

.login-logo {
    font-size: 4em;
    text-align: center;
    margin-bottom: 20px;
}

.login-title {
    text-align: center;
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 30px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .stat-card {
        margin-bottom: 15px;
    }
    
    .card-header {
        padding: 15px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .table {
        font-size: 0.9em;
    }
}

/* Utilidades personalizadas */
.shadow-custom {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.rounded-custom {
    border-radius: 15px;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state p {
    font-size: 1.2em;
    margin-bottom: 20px;
}

/* Modals mejorados */
.modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-radius: 20px 20px 0 0;
    border: none;
}

.modal-footer {
    border: none;
    padding: 20px;
}

/* Breadcrumb personalizado */
.breadcrumb {
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.breadcrumb-item.active {
    color: var(--primary);
    font-weight: 600;
}

/* Spinner loading */
.spinner-custom {
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Info boxes */
.info-box {
    background: #f8f9ff;
    border-left: 4px solid var(--primary);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.info-box strong {
    color: var(--primary);
}

/* Progress bars personalizados */
.progress {
    height: 25px;
    border-radius: 15px;
    background: #e9ecef;
}

.progress-bar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 15px;
}
