body {
    min-height: 100vh;
    background: linear-gradient(90deg, #009fe3 0%, #005fa3 100%);
}
.sidebar {
    background: #1a2a3a;
    color: #fff;
    min-height: 100vh;
    width: 220px;
    position: fixed;
    top: 0;
    left: 0;
    padding: 2rem 1rem 1rem 1rem;
    box-shadow: 2px 0 8px rgba(0,0,0,0.08);
}
.sidebar .logo {
    max-width: 160px;
    width: 100%;
    height: auto;
    margin-bottom: 2rem;
    filter: brightness(0) invert(1); /* Hace el logo blanco */
    transition: filter 0.3s ease;
}
.sidebar .logo:hover {
    filter: brightness(1) invert(0); /* Restaura colores originales al hover */
}
.sidebar .nav-link {
    color: #fff;
    margin-bottom: 1rem;
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}
.sidebar .nav-link.active,
.sidebar .nav-link:hover {
    color: #009fe3;
    background: #fff;
    border-radius: 6px;
    text-decoration: none;
}
.main-content {
    margin-left: 220px;
    padding: 2rem;
}
.header {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 1rem 2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.header-logo {
    max-height: 40px;
    width: auto;
    filter: brightness(0) saturate(100%) invert(20%) sepia(100%) saturate(2000%) hue-rotate(200deg) brightness(0.7) contrast(1);
}
.header-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #005fa3;
}
.user-info {
    color: #005fa3;
    font-weight: 500;
}

/* Estilos para el Dashboard */
.dashboard-container {
    background: transparent;
}

.dashboard-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #009fe3, #005fa3);
}

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

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.card-content {
    flex: 1;
}

.card-number {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: #005fa3;
    line-height: 1;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0.25rem 0 0.125rem 0;
    color: #333;
}

.card-subtitle {
    font-size: 0.875rem;
    color: #666;
    margin: 0;
}

.dashboard-section {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
}

.section-header h4 {
    margin: 0;
    color: #005fa3;
    font-weight: 600;
    font-size: 1.25rem;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: rgba(0, 95, 163, 0.05);
    border-bottom: 2px solid rgba(0, 95, 163, 0.1);
    color: #005fa3;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.table tbody tr:hover {
    background: rgba(0, 159, 227, 0.05);
    transform: scale(1.01);
}

.table tbody td {
    vertical-align: middle;
    border-color: rgba(0, 0, 0, 0.05);
    font-size: 0.9rem;
}

.badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-weight: 600;
}

.processor-status {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.status-label {
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
}

.status-value {
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}

.status-value.text-success {
    color: #28a745;
}

.status-value.text-danger {
    color: #dc3545;
}

/* Estilos para MSJ2 y MSJ6 */
.message-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.message-info {
    flex: 1;
}

.message-title {
    margin: 0 0 0.5rem 0;
    color: #005fa3;
    font-weight: 600;
    font-size: 1.1rem;
}

.message-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.meta-item {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: #666;
    background: rgba(0, 0, 0, 0.02);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.message-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.info-card {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    padding: 1rem;
    height: 100%;
}

.info-card h6 {
    margin: 0 0 1rem 0;
    color: #005fa3;
    font-weight: 600;
    font-size: 0.9rem;
}

.info-grid {
    display: grid;
    gap: 0.5rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #666;
    font-size: 0.85rem;
}

.info-value {
    font-weight: 500;
    color: #333;
    font-size: 0.85rem;
}

.header-stats {
    display: flex;
    gap: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .message-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .message-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .message-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .meta-item {
        width: 100%;
    }
}

/* Estilos mejorados para el menú de usuario */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-info {
    cursor: pointer;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(0, 95, 163, 0.05) 0%, rgba(0, 159, 227, 0.05) 100%);
    border: 2px solid rgba(0, 95, 163, 0.1);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.user-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.user-info:hover::before {
    left: 100%;
}

.user-info:hover {
    background: linear-gradient(135deg, rgba(0, 95, 163, 0.1) 0%, rgba(0, 159, 227, 0.1) 100%);
    border-color: rgba(0, 95, 163, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 95, 163, 0.15);
}

.user-info.active {
    background: linear-gradient(135deg, rgba(0, 95, 163, 0.15) 0%, rgba(0, 159, 227, 0.15) 100%);
    border-color: rgba(0, 95, 163, 0.4);
    box-shadow: 0 4px 16px rgba(0, 95, 163, 0.2);
}

.user-info i {
    transition: all 0.3s ease;
}

.user-info .fa-chevron-down {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.08);
    min-width: 220px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.user-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
    filter: drop-shadow(0 -2px 4px rgba(0, 0, 0, 0.1));
}

.user-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.user-menu-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.user-menu-item:last-child {
    border-bottom: none;
}

.user-menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #009fe3, #005fa3);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.user-menu-item:hover {
    background: linear-gradient(135deg, rgba(0, 159, 227, 0.05) 0%, rgba(0, 95, 163, 0.05) 100%);
    color: #009fe3;
    text-decoration: none;
    transform: translateX(4px);
    padding-left: 1.5rem;
}

.user-menu-item:hover::before {
    transform: scaleY(1);
}

.user-menu-item i {
    width: 18px;
    text-align: center;
    margin-right: 0.75rem;
    transition: all 0.3s ease;
}

.user-menu-item:hover i {
    transform: scale(1.1);
    color: #009fe3;
}

/* Estilos para botones - SOLO ESTO CAMBIADO */
.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background-color: #005fa3;
    border-color: #005fa3;
}

.btn-primary:hover {
    background-color: #004d8a;
    border-color: #004d8a;
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #218838;
}

.btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
    border-color: #e0a800;
    color: #212529;
}

.btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
}

.btn-info:hover {
    background-color: #138496;
    border-color: #138496;
}

.btn-outline-primary {
    color: #005fa3;
    border-color: #005fa3;
}

.btn-outline-primary:hover {
    background-color: #005fa3;
    border-color: #005fa3;
}

.btn-outline-success {
    color: #28a745;
    border-color: #28a745;
}

.btn-outline-success:hover {
    background-color: #28a745;
    border-color: #28a745;
}

.btn-outline-warning {
    color: #ffc107;
    border-color: #ffc107;
}

.btn-outline-warning:hover {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

/* Estilos para el modal */
.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(0, 159, 227, 0.05) 0%, rgba(0, 95, 163, 0.05) 100%);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.5rem 2rem;
    background: rgba(0, 0, 0, 0.02);
}

.modal-title {
    color: #005fa3;
    font-weight: 700;
    font-size: 1.25rem;
}

.form-control {
    border-radius: 8px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #009fe3;
    box-shadow: 0 0 0 0.2rem rgba(0, 159, 227, 0.25);
}

/* Animaciones para las alertas */
.alert {
    border-radius: 12px;
    border: none;
    font-weight: 500;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 4px solid #28a745;
}

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

/* Estilos para el Footer dentro del sidebar */
.sidebar-footer {
    margin-top: auto;
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
}

.sidebar-footer .footer-info {
    text-align: center;
}

.sidebar-footer .footer-info a {
    transition: all 0.3s ease;
    color: #009fe3 !important;
}

.sidebar-footer .footer-info a:hover {
    color: #fff !important;
    transform: translateY(-1px);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.sidebar-footer .footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.sidebar-footer .footer-links a {
    transition: all 0.3s ease;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

.sidebar-footer .footer-links a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #009fe3 !important;
    transform: translateY(-1px);
}

.sidebar-footer .footer-links i {
    transition: transform 0.3s ease;
}

.sidebar-footer .footer-links a:hover i {
    transform: scale(1.1);
}

.sidebar-footer .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 0.75rem;
}

.sidebar-footer .text-info {
    color: #009fe3 !important;
}

/* Responsive para el footer del sidebar */
@media (max-width: 768px) {
    .sidebar-footer {
        padding: 0.5rem 0;
    }
    
    .sidebar-footer .footer-links {
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
    }
}
