#smsBadge {
    position: absolute;
   top: -8px;
   right: -8px;
   background-color: #dc3545;
   color: white;
   border-radius: 50%;
   width: 20px;
   height: 20px;
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 12px;
   font-weight: bold;

}


/* S'assurer que le bouton est en position relative pour que le badge soit correctement positionné */
#smsButton {
position: relative;
}

/* S'assurer que tous les boutons avec des badges sont en position relative */
.action-button {
position: relative;
}

.sms-pending {
margin-top: 20px;
border-top: 1px solid #eee;
padding-top: 15px;
}

.sms-pending h3 {
margin-bottom: 15px;
font-size: 16px;
color: #555;
}

.pending-sms-list {
max-height: 300px;
overflow-y: auto;
border: 1px solid #eaeaea;
border-radius: 5px;
background-color: #f9f9f9;
}

.pending-sms-item {
padding: 10px 12px;
border-bottom: 1px solid #eaeaea;
transition: background-color 0.2s;
display: flex;
flex-direction: column;
}

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

.pending-sms-item:hover {
background-color: #f0f0f0;
}

.pending-sms-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 4px;
}

.pending-sms-info {
display: flex;
flex-direction: column;
}

.pending-sms-number {
font-weight: bold;
color: #333;
font-size: 13px;
}

.pending-sms-user {
font-size: 11px;
color: #666;
font-style: italic;
}

.pending-sms-meta {
display: flex;
align-items: center;
gap: 5px;
}

.pending-sms-date {
font-size: 11px;
color: #777;
}

.pending-sms-status-indicator {
width: 8px;
height: 8px;
border-radius: 50%;
display: inline-block;
}

.status-pending.pending-sms-status-indicator {
background-color: #3498db;
}

.status-success.pending-sms-status-indicator {
background-color: #2ecc71;
}

.status-error.pending-sms-status-indicator {
background-color: #e74c3c;
}

.pending-sms-content {
font-size: 14px;
line-height: 1.4;
color: #555;
margin-bottom: 8px;
word-break: break-word;
}

.pending-sms-status {
display: flex;
justify-content: flex-end;
}

.status-pending {
color: #3498db;
font-size: 12px;
font-weight: bold;
}

.status-success {
color: #2ecc71;
font-size: 12px;
font-weight: bold;
}

.status-error {
color: #e74c3c;
font-size: 12px;
font-weight: bold;
}

.no-pending-sms {
padding: 20px;
text-align: center;
color: #999;
font-style: italic;
}

/* Styles pour la page principale de SMS */
.columns-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

#users-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#users-column .card-body {
    flex: 1;
    overflow: auto;
}

/* Liste des utilisateurs */
.users-list {
    padding: 1rem;
}

/* Loading */
#users-loading {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: #6c757d;
}

#users-loading i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #007bff;
}

/* Message d'erreur ou pas d'utilisateurs */
.no-users, .error-message {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.no-users i, .error-message i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.error-message i {
    color: #dc3545;
}


.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
    font-size: 1.2rem;
}

/* Couleurs pour les avatars */
.avatar-initials[data-color="1"] { background-color: #007bff; }
.avatar-initials[data-color="2"] { background-color: #6610f2; }
.avatar-initials[data-color="3"] { background-color: #6f42c1; }
.avatar-initials[data-color="4"] { background-color: #e83e8c; }
.avatar-initials[data-color="5"] { background-color: #dc3545; }
.avatar-initials[data-color="6"] { background-color: #fd7e14; }
.avatar-initials[data-color="7"] { background-color: #28a745; }
.avatar-initials[data-color="8"] { background-color: #20c997; }

/* Informations utilisateur */
.user-info {
    flex: 1;
    min-width: 0;
}


.user-role {
    background-color: #f8f9fa;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
}

.user-status {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.user-status i {
    font-size: 0.7rem;
}

.status-online .user-status i {
    color: #28a745;
}

.user-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: #6c757d;
}

.user-email, .user-phone {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Actions sur l'utilisateur */
.user-actions {
    display: flex;
    gap: 0.5rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.user-item:hover .user-actions {
    opacity: 1;
}

/* Détails de l'utilisateur */
.user-details-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.user-header {
    display: flex;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.user-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 1.5rem;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.user-info-main {
    flex: 1;
}

.user-info-main h3 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
}

.user-details-section {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.user-details-section h4 {
    font-size: 1.1rem;
    margin: 0 0 1rem;
    color: #343a40;
}

.detail-row {
    display: flex;
    margin-bottom: 0.75rem;
}

.detail-label {
    flex: 0 0 35%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #6c757d;
}

.detail-value {
    flex: 0 0 65%;
    color: #343a40;
    word-break: break-word;
}

.user-actions-section {
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Statut de l'utilisateur dans les détails */
.user-status {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.user-status.online {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.user-status.offline {
    background-color: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
}

.online .status-dot {
    background-color: #28a745;
}

.offline .status-dot {
    background-color: #6c757d;
}

/* Animation de suppression */
@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
}

/* Chargement des détails */
.loading-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.loading-details i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .user-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .user-item-content {
        margin-bottom: 1rem;
        width: 100%;
    }
    
    .user-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .detail-row {
        flex-direction: column;
    }
    
    .detail-label, .detail-value {
        flex: 0 0 100%;
    }
    
    .detail-label {
        margin-bottom: 0.25rem;
    }
}

/* Style compact des utilisateurs inspiré des notes/tâches */
.users-list-compact {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.user-row {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 4px solid #ddd;
    overflow: hidden;
    transition: all 0.2s ease;
}

.user-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.user-row.status-online {
    border-left-color: #2ecc71;
}

.user-row.status-offline {
    border-left-color: #95a5a6;
}

.user-row-content {
    display: flex;
    align-items: center;
    padding: 12px;
    gap: 15px;
}

.user-avatar-small {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.avatar-initials {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    background-color: #3498db;
    font-size: 16px;
}

.avatar-initials[data-color="1"] { background-color: #3498db; }
.avatar-initials[data-color="2"] { background-color: #2ecc71; }
.avatar-initials[data-color="3"] { background-color: #e74c3c; }
.avatar-initials[data-color="4"] { background-color: #f39c12; }
.avatar-initials[data-color="5"] { background-color: #9b59b6; }
.avatar-initials[data-color="6"] { background-color: #1abc9c; }
.avatar-initials[data-color="7"] { background-color: #e67e22; }
.avatar-initials[data-color="8"] { background-color: #34495e; }

.user-info-compact {
    flex: 1;
    min-width: 0;
}

.user-status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 15px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.status-online {
    background-color: #2ecc71;
}

.status-dot.status-offline {
    background-color: #95a5a6;
}

.role-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
    text-transform: uppercase;
}

.role-badge.role-admin {
    background-color: #e74c3c;
    color: white;
}

.role-badge.role-user {
    background-color: #3498db;
    color: white;
}

.user-last-activity {
    font-size: 11px;
    color: #7f8c8d;
    margin-right: 15px;
    white-space: nowrap;
}

.user-actions-compact {
    display: flex;
    gap: 5px;
}

.btn-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background-color: #f1f3f5;
    color: #495057;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-icon:hover {
    background-color: #dee2e6;
    transform: translateY(-2px);
}

.btn-icon i {
    font-size: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .user-row-content {
        flex-wrap: wrap;
    }
    
    .user-info-compact {
        flex: 0 0 calc(100% - 55px);
        margin-bottom: 10px;
    }
    
    .user-status-indicator {
        order: 3;
        margin-left: 55px;
    }
    
    .user-last-activity {
        order: 4;
        margin-left: auto;
    }
    
    .user-actions-compact {
        order: 5;
        margin-left: auto;
        margin-top: 10px;
    }
}

/* Nouveau style pour le listing des utilisateurs */
.content-wrapper {
    padding-bottom: 2rem;
}

/* Filtres et recherche */
.users-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.nav-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
}

.nav-tabs .btn {
    background-color: #f8f9fa;
    border: none;
    color: #495057;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    transition: all 0.2s;
}


.nav-tabs .btn.active {
    color: white;
}

.nav-tabs .badge {
    background-color: rgba(0, 0, 0, 0.1);
    color: inherit;
    margin-left: 6px;
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
}

.search-container {
    position: relative;
    width: 300px;
}

.search-container input {
    padding-left: 2.5rem;
    border-radius: 2rem;
    border: 1px solid #ced4da;
    width: 100%;
}

.search-container i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

/* Grille d'utilisateurs */
.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

.user-card {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
}

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

.user-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: #6c757d;
}

.user-card.status-online::before {
    background-color: #2ecc71;
}

.user-card.status-offline::before {
    background-color: #95a5a6;
}

.user-card-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
}

.user-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.avatar-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 1.8rem;
}

.user-status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.user-status-badge.status-online {
    background-color: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
}

.user-status-badge.status-offline {
    background-color: rgba(149, 165, 166, 0.1);
    color: #95a5a6;
}

.user-card-body {
    padding: 0 1.5rem 1.5rem;
    flex: 1;
}

.user-role-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.user-role-badge.role-admin {
    background-color: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.user-role-badge.role-user {
    background-color: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.user-role-badge.role-dispatcher {
    background-color: rgba(155, 89, 182, 0.1);
    color: #9b59b6;
}

.user-role-badge.role-viewer {
    background-color: rgba(243, 156, 18, 0.1);
    color: #f39c12;
}

.user-contact-info {
    margin-bottom: 1rem;
}

.user-email, .user-phone {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #555;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-last-login {
    font-size: 0.85rem;
    color: #777;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-card-footer {
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    border-top: 1px solid #eee;
}

.btn-action {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background-color: white;
    color: #555;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
    cursor: pointer;
}

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

.btn-action.view-user:hover {
    background-color: #3498db;
    color: white;
}

.btn-action.edit-user:hover {
    background-color: #f39c12;
    color: white;
}

.btn-action.delete-user:hover {
    background-color: #e74c3c;
    color: white;
}

/* Styles pour les états vides et erreurs */
.no-users, .error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    color: #555;
}

.no-users i, .error-message i {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    opacity: 0.7;
}

.error-message i {
    color: #e74c3c;
}

.error-message p {
    color: #e74c3c;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 992px) {
    .users-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .users-filters {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .nav-tabs {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    .search-container {
        width: 100%;
    }
    
    .users-grid {
        grid-template-columns: 1fr;
    }
}

/* Animation de chargement */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#users-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

#users-loading i {
    font-size: 2rem;
    margin-bottom: 1rem;
    animation: spin 1s linear infinite;
    color: #3498db;
}