/* Estilos personalizados para Grupo Stibium */

:root {
    --primary-color: #4e73df;
    --secondary-color: #858796;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --light-color: #f8f9fc;
    --dark-color: #5a5c69;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    color: var(--dark-color);
}

.bg-gradient-primary {
    background: linear-gradient(180deg, var(--primary-color) 10%, #224abe 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

.bg-login-image {
    background: linear-gradient(rgba(78, 115, 223, 0.1), rgba(78, 115, 223, 0.1));
}

.form-control-user {
    border-radius: 10rem;
    padding: 1.5rem 1rem;
    border: 1px solid #e3e6f0;
    font-size: 0.9rem;
}

.form-control-user:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.btn-user {
    border-radius: 10rem;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
}

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

.btn-primary:hover {
    background-color: #2e59d9;
    border-color: #2653d4;
}

.card {
    border-radius: 15px;
}

.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

/* Sidebar Styles */
.sidebar {
    width: 14rem;
    min-height: 100vh;
    background: linear-gradient(180deg, var(--dark-color) 10%, #3c3c4e 100%);
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1rem;
    border-radius: 0.35rem;
    margin: 0.1rem 0.5rem;
    transition: all 0.15s ease-in-out;
}

.sidebar .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    color: #fff;
    background-color: var(--primary-color);
}

.sidebar-brand {
    color: #fff;
    text-decoration: none;
    padding: 1.5rem 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar-brand:hover {
    color: #fff;
    text-decoration: none;
}

.collapse-item {
    padding: 0.5rem 1rem 0.5rem 3rem;
    color: rgba(255, 255, 255, 0.7);
    display: block;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
}

.collapse-item:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.collapse-item.active {
    color: #fff;
    background-color: var(--primary-color);
}

/* Main content area */
.main-content {
    margin-left: 14rem;
    padding: 1rem;
    min-height: 100vh;
    background-color: var(--light-color);
}

/* Topbar */
.topbar {
    height: 4.375rem;
    background-color: #fff;
    border-bottom: 1px solid #e3e6f0;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

/* Content iframe */
.content-iframe {
    width: 100%;
    height: calc(100vh - 140px);
    border: none;
    border-radius: 0.35rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar {
        width: 0;
        position: fixed;
        z-index: 1000;
        transition: width 0.3s ease;
    }
    
    .sidebar.show {
        width: 14rem;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-menu-toggle {
        display: block !important;
    }
}

@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none !important;
    }
}

/* Toggle button for mobile */
.mobile-menu-toggle {
    background: none;
    border: none;
    color: var(--dark-color);
    font-size: 1.25rem;
    padding: 0.5rem;
}

/* Password change modal */
.modal-content {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-header {
    background-color: var(--primary-color);
    color: white;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

/* Loading spinner */
.loading-spinner {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

/* Welcome message */
.welcome-content {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--secondary-color);
}

.welcome-content i {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Group headers in sidebar */
.nav-group-header {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    padding: 1rem 1rem 0.5rem;
    margin-top: 1rem;
}

.nav-group-header:first-child {
    margin-top: 0;
}

/* Animation for collapsible menu items */
.collapse {
    transition: height 0.35s ease;
}

/* Style for inactive/placeholder items */
.nav-link.disabled {
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
}

.nav-link.disabled:hover {
    color: rgba(255, 255, 255, 0.4);
    background-color: transparent;
}

/* Estilos para el dashboard con tarjetas */
.dashboard-container {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 2rem 0;
}

.header-section {
    text-align: center;
    margin-bottom: 3rem;
    color: #2c3e50;
}

.header-section h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.header-section p {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 2rem;
}

.section-title {
    color: #2c3e50;
    font-size: 2rem;
    font-weight: 700;
    margin: 3rem 0 1rem 0;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.section-subtitle {
    color: #6c757d;
    font-size: 1rem;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 400;
}

.subsection-title {
    color: #495057;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    padding-left: 0.5rem;
    border-left: 4px solid #007bff;
    background: rgba(0, 123, 255, 0.05);
    padding: 0.5rem 0 0.5rem 1rem;
    border-radius: 0.25rem;
}

.subsection-title i {
    color: #007bff;
}

.card-app {
    background: linear-gradient(145deg, #2c3e50, #34495e);
    border: none;
    border-radius: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    height: 200px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    overflow: hidden;
    position: relative;
}

.card-app::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.05), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.card-app:hover::before {
    transform: translateX(100%);
}

.card-app:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.card-app .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100%;
    padding: 1.5rem;
    color: white;
}

.app-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #3498db;
    transition: all 0.3s ease;
}

.card-app:hover .app-icon {
    transform: scale(1.1);
    color: #5dade2;
}

.app-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #ecf0f1;
}

.app-description {
    font-size: 0.85rem;
    color: #bdc3c7;
    margin: 0;
    line-height: 1.4;
}

.card-saludel .app-icon {
    color: #e74c3c;
}

.card-saludel:hover .app-icon {
    color: #ec7063;
}

.card-heliosar .app-icon {
    color: #f39c12;
}

.card-heliosar:hover .app-icon {
    color: #f7dc6f;
}

.user-info {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.user-info h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.user-info p {
    color: #7f8c8d;
    margin: 0;
}

.btn-change-password {
    background: linear-gradient(45deg, #3498db, #2980b9);
    border: none;
    border-radius: 25px;
    padding: 0.75rem 2rem;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.btn-change-password:hover {
    background: linear-gradient(45deg, #5dade2, #3498db);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
    color: white;
}

.btn-login {
    background: linear-gradient(45deg, #3498db, #2980b9);
    border: none;
    border-radius: 25px;
    padding: 0.75rem 2rem;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-login:hover {
    background: linear-gradient(45deg, #5dade2, #3498db);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
    color: white;
}

@media (max-width: 768px) {
    .header-section h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .card-app {
        height: 180px;
    }
    
    .app-icon {
        font-size: 2.5rem;
    }
}