﻿/* ========================================
   General Styles
   ======================================== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* ========================================
   Login Page Styles
   ======================================== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    animation: fadeInUp 0.5s ease;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 60px;
    color: #667eea;
    margin-bottom: 15px;
}

.login-header h2 {
    color: #333;
    margin-bottom: 5px;
    font-weight: 600;
}

.login-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.login-card .form-control {
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.login-card .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.login-card .btn-primary {
    padding: 12px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.login-card .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* ========================================
   Dashboard Styles
   ======================================== */
.container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-top: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.welcome-section h1 {
    color: #333;
    font-weight: 700;
}

/* ========================================
   Module Cards
   ======================================== */
.module-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid #e0e0e0;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.module-card.active {
    cursor: pointer;
    border-color: #667eea;
}

.module-card.active:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(102, 126, 234, 0.3);
    border-color: #764ba2;
}

.module-card.locked {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f8f9fa;
}

.module-icon {
    font-size: 60px;
    margin-bottom: 20px;
    position: relative;
}

.module-card.active .module-icon {
    color: #667eea;
}

.module-card.locked .module-icon {
    color: #999;
}

.lock-icon {
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 30px;
    color: #dc3545;
}

.module-card h3 {
    color: #333;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.module-description {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 20px;
}

.module-status {
    margin-top: auto;
}

.module-status .badge {
    font-size: 0.85rem;
    padding: 8px 15px;
}

/* ========================================
   Dashboard Module Page
   ======================================== */
.dashboard-header {
    margin-bottom: 40px;
}

.dashboard-icon {
    font-size: 80px;
    color: #667eea;
    margin-bottom: 20px;
}

.dashboard-header h1 {
    color: #333;
    font-weight: 700;
}

/* ========================================
   Navbar Styles
   ======================================== */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.3rem;
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .module-card {
        margin-bottom: 20px;
    }
    
    .login-card {
        padding: 30px 20px;
    }
}

/* ========================================
   Dashboard with Sidebar Layout
   ======================================== */
.dashboard-wrapper {
    display: flex;
    min-height: calc(100vh - 56px);
    background: #f5f5f5;
}

/* ========================================
   Sidebar Styles
   ======================================== */
.sidebar {
    width: 250px;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    height: calc(100vh - 56px);
    overflow-y: auto;
}

.sidebar-header {
    padding: 25px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.sidebar-header i {
    font-size: 40px;
    margin-bottom: 10px;
    display: block;
}

.sidebar-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 1.1rem;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    color: #555;
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-menu li a i {
    font-size: 20px;
    margin-right: 15px;
    width: 25px;
    text-align: center;
}

.sidebar-menu li a span {
    font-weight: 500;
}

.sidebar-menu li a:hover {
    background: #f8f9fa;
    color: #667eea;
    padding-left: 25px;
}

.sidebar-menu li.active a {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-left: 4px solid #764ba2;
}

.sidebar-menu li.active a:hover {
    padding-left: 20px;
}

/* ========================================
   Main Content Area
   ======================================== */
.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.content-header {
    margin-bottom: 30px;
}

.content-header h2 {
    color: #333;
    font-weight: 700;
    margin-bottom: 5px;
}

.content-header p {
    margin: 0;
}

/* ========================================
   Statistics Cards
   ======================================== */
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-size: 30px;
    color: white;
}

.stat-icon.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-icon.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.stat-icon.bg-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.stat-info p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* ========================================
   Report Cards
   ======================================== */
.report-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.report-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.report-icon {
    font-size: 50px;
    color: #667eea;
    margin-bottom: 15px;
}

.report-card h4 {
    color: #333;
    font-weight: 600;
    margin-bottom: 10px;
}

.report-card p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* ========================================
   Configuration Section
   ======================================== */
.config-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.config-section h4 {
    color: #333;
    font-weight: 600;
    margin-bottom: 20px;
}

.config-section hr {
    margin-bottom: 25px;
}

/* ========================================
   Responsive Sidebar
   ======================================== */
@media (max-width: 992px) {
    .dashboard-wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .sidebar-menu {
        display: flex;
        overflow-x: auto;
    }
    
    .sidebar-menu li {
        border-bottom: none;
        border-right: 1px solid #f0f0f0;
        flex-shrink: 0;
    }
    
    .sidebar-menu li a {
        flex-direction: column;
        padding: 15px 20px;
        text-align: center;
    }
    
    .sidebar-menu li a i {
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    .sidebar-menu li a:hover {
        padding-left: 20px;
    }
    
    .main-content {
        padding: 20px;
    }
}

/* ========================================
   Configuration Tabs
   ======================================== */
.config-tabs {
    background: white;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    padding: 0;
    margin-bottom: 30px;
    display: flex;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
}

.config-tabs .nav-item {
    flex: 1;
}

.config-tabs .nav-link {
    color: #666;
    border: none;
    background: white;
    padding: 15px 20px;
    margin: 0;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 0;
    font-size: 0.95rem;
    text-align: center;
    width: 100%;
    border-right: 1px solid #e0e0e0;
}

.config-tabs .nav-item:first-child .nav-link {
    border-radius: 8px 0 0 8px;
}

.config-tabs .nav-item:last-child .nav-link {
    border-radius: 0 8px 8px 0;
    border-right: none;
}

.config-tabs .nav-link i {
    margin-right: 8px;
    font-size: 1rem;
}

.config-tabs .nav-link:hover {
    color: #667eea;
    background: #f8f9fa;
}

.config-tabs .nav-link.active {
    color: #667eea;
    background: #f0f3ff;
    font-weight: 600;
    border-bottom: 3px solid #667eea;
}

.config-tab-content {
    background: transparent;
    padding: 0;
    box-shadow: none;
    min-height: 400px;
}

.config-tab-content .config-section {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.config-tab-content .config-section h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

/* Responsive tabs */
@media (max-width: 768px) {
    .config-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .config-tabs .nav-item {
        flex: 0 0 auto;
        min-width: 120px;
    }
    
    .config-tabs .nav-link {
        font-size: 0.85rem;
        padding: 12px 15px;
    }
    
    .config-tabs .nav-link i {
        display: block;
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    .config-tab-content .config-section {
        padding: 20px;
    }
}

/* ========================================
   Sortable Table Headers
   ======================================== */
.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.sortable:hover {
    background-color: #f0f3ff !important;
}

.sortable i {
    font-size: 0.8rem;
    margin-left: 5px;
    color: #999;
}

.sortable:hover i {
    color: #667eea;
}

/* ========================================
   Periodo Seleccionado Panel
   ======================================== */
.periodo-seleccionado-panel {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 15px 20px;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    min-width: 280px;
    max-width: 350px;
}

.periodo-seleccionado-panel.no-seleccionado {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    box-shadow: 0 4px 15px rgba(127, 140, 141, 0.2);
}

.periodo-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    opacity: 0.9;
}

.periodo-label i {
    margin-right: 5px;
}

.periodo-info {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 10px 12px;
    backdrop-filter: blur(10px);
}

.periodo-id {
    font-size: 0.7rem;
    opacity: 0.85;
    margin-bottom: 4px;
}

.periodo-nombre {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.2;
}

.periodo-fechas {
    font-size: 0.8rem;
    opacity: 0.9;
}

.periodo-fechas i {
    margin-right: 5px;
    font-size: 0.75rem;
}

/* ========================================
   Periodo Selected Row Highlight
   ======================================== */
.periodo-selected {
    background-color: #e8f4f8 !important;
    border-left: 4px solid #17a2b8;
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.15);
}

.periodo-selected:hover {
    background-color: #d4eef5 !important;
}

.periodo-selected td {
    font-weight: 500;
}

/* AnimaciÃ³n suave para el resaltado */
@keyframes highlightPulse {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(23, 162, 184, 0.15);
    }
    50% {
        box-shadow: 0 4px 12px rgba(23, 162, 184, 0.25);
    }
}

.periodo-selected {
    animation: highlightPulse 2s ease-in-out infinite;
}

/* ========================================
   BLOQUES DE EVALUACIÓN - DISEÑO LIMPIO
   ======================================== */

.bloque-card-simple {`n    background: #fff;`n    border: 1px solid #e3e6f0;`n    border-radius: 10px;`n    overflow: hidden;`n    transition: all 0.3s ease;`n    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    margin-bottom: 1.5rem;
}

.bloque-card-simple:hover {`n    transform: translateY(-5px);`n    box-shadow: 0 0.5rem 2rem 0 rgba(58, 59, 69, 0.25);`n    border-color: #4e73df;`n}

.bloque-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e3e6f0;
    background: #fff;
}

.bloque-title {
    font-size: 1rem;
    font-weight: 600;
    color: #4e73df;
    margin: 0;
    line-height: 1.4;
}

.bloque-card-header .badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
    font-weight: 600;
    border-radius: 4px;
}

.bloque-actions-top {
    display: flex;
    gap: 0.25rem;
    margin-left: 1rem;
}

.bloque-actions-top .btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.bloque-actions-top .btn:hover {
    background-color: rgba(0,0,0,0.05);
}

.bloque-actions-top .btn i {
    font-size: 0.875rem;
}

.bloque-card-body {
    padding: 1.25rem 1.5rem;
    background: #fff;
}

.bloque-card-body p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #858796;
}

.form-check-input.toggle-estado-bloque {
    cursor: pointer;
    width: 2.75rem;
    height: 1.5rem;
    border-radius: 2rem;
}

.form-check-input.toggle-estado-bloque:checked {
    background-color: #1cc88a;
    border-color: #1cc88a;
}

.form-check-input.toggle-estado-bloque:focus {
    box-shadow: 0 0 0 0.2rem rgba(28, 200, 138, 0.25);
}

.estado-label {
    font-size: 0.875rem;
    font-weight: 600;
    margin-left: 0.5rem;
    cursor: pointer;
    color: #1cc88a;
}

/* Grid spacing mejorado */
.row.g-3 {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .bloque-card-simple {
        margin-bottom: 1rem;
    }
    
    .bloque-card-header,
    .bloque-card-body {
        padding: 1rem 1.25rem;
    }
}



