/* Estilos base optimizados */
body {
    background: linear-gradient(45deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: 60px 0;
    position: relative;
}

.container {
    position: relative;
    z-index: 1;
}

/* Sección de bienvenida simplificada */
.welcome-section {
    text-align: center;
    margin-bottom: 60px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.8s ease-out;
}

.welcome-section h1 {
    font-size: 3rem;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 300;
}

.welcome-section h1::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 2px;
    margin: 10px auto 0;
}

.welcome-section p {
    font-size: 1.3rem;
    color: #7f8c8d;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Tarjetas de navegación optimizadas */
.navigation-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.nav-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 50px 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* Iconos simplificados */
.card-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
}

.nav-card h3 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 600;
}

.nav-card p {
    color: #7f8c8d;
    margin-bottom: 35px;
    line-height: 1.7;
    font-size: 1.1rem;
}

/* Botones optimizados */
.btn-large {
    padding: 16px 35px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #1f4e79);
    transform: translateY(-3px);
}

/* Animaciones esenciales */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Responsive design optimizado */
@media (max-width: 768px) {
    .welcome-section h1 {
        font-size: 2.2rem;
    }

    .welcome-section p {
        font-size: 1.1rem;
    }

    .navigation-cards {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 20px;
    }

    .nav-card {
        padding: 40px 30px;
    }

    .card-icon {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .welcome-section {
        padding: 30px 20px;
    }

    .welcome-section h1 {
        font-size: 2rem;
    }

    .nav-card {
        padding: 30px 20px;
    }
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Footer styles */
footer {
    background: #2c3e50;
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content {
    display: grid;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #3498db;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
}

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

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

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

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #7f8c8d;
}

.system-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.session-info {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

.status-active {
    color: #27ae60;
}

.btn-close {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .system-info-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 20px;
    }
}


/* Iconos inline para el header */
.icon {
    font-style: normal;
    margin-right: 8px;
    font-size: 0.9em;
    opacity: 0.8;
}

/* Ajuste para rutas relativas en subdirectorios */
nav a[href*="modules/"],
nav a[href*="dashboard.php"],
nav a[href*="perfil.php"],
nav a[href*="logout.php"] {
    color: white;
    text-decoration: none;
}

/* Mejora visual para división del usuario */
.user-dropdown a[onclick="return false;"] {
    background-color: rgba(52, 152, 219, 0.1);
    border-left: 3px solid #3498db;
    font-weight: 500;
}

/* Responsive para iconos */
@media (max-width: 768px) {
    .icon {
        display: none;
    }

    .user-name {
        display: none;
    }

    .user-avatar {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
}