/* Estilos para la vista de usuarios en el admin - Actualizado */

/* Encabezado de usuarios */
.users-header {
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
}

.users-header h2 {
    color: #495057 !important;
    font-weight: 600 !important;
    margin-bottom: 1.5rem !important;
    font-size: 1.75rem;
}

.users-header .d-flex {
    margin-bottom: 1rem;
}

/* Botón de agregar usuario */
.btn-add-user {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
    border: none !important;
    color: white !important;
    padding: 0.5rem 1rem !important;
    border-radius: 0.375rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 4px rgba(0,123,255,0.3);
}

.btn-add-user:hover {
    background: linear-gradient(135deg, #0056b3 0%, #003d82 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,123,255,0.4);
    color: white !important;
    text-decoration: none !important;
}

/* Tabla de usuarios */
.users-table {
    background-color: white !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
    overflow: hidden !important;
    border: 1px solid #dee2e6;
}

/* Contenedor responsivo para tablas del admin */
.admin-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1rem;
}

.admin-table-container::-webkit-scrollbar {
    height: 8px;
}

.admin-table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.admin-table-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.admin-table-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Tabla responsiva del admin */
.admin-table {
    min-width: 100%;
    white-space: nowrap;
    margin-bottom: 0;
}

.admin-table th,
.admin-table td {
    white-space: nowrap;
    min-width: fit-content;
}

/* Celdas que pueden expandirse */
.admin-table .expandable-cell {
    max-width: 200px;
    white-space: normal;
    word-wrap: break-word;
}

/* Badges para roles */
.role-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

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

.role-user {
    background-color: #28a745;
    color: white;
}

.role-moderator {
    background-color: #ffc107;
    color: #212529;
}

/* Botones de acción */
.actions-cell {
    width: 120px;
    text-align: center;
}

.btn-action {
    margin: 0 0.125rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.25rem;
}

.btn-action i {
    font-size: 0.75rem;
}

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

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

.btn-delete {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.btn-delete:hover {
    background-color: #c82333;
    border-color: #bd2130;
    color: white;
}

/* Botón agregar usuario */
.btn-add-user {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
    padding: 0.5rem 1rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.btn-add-user:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    color: white;
}

.btn-add-user i {
    margin-left: 0.25rem;
}

/* Paginación */
.pagination-wrapper {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}

/* Indicador de organismo vacío */
.no-organismo {
    color: #6c757d;
    font-style: italic;
}

/* Responsividad */
@media (max-width: 768px) {
    .users-table {
        font-size: 0.875rem;
    }
    
    .users-table th,
    .users-table td {
        padding: 0.5rem 0.25rem;
    }
    
    .btn-action {
        padding: 0.125rem 0.25rem;
        margin: 0 0.05rem;
    }
    
    .btn-action i {
        font-size: 0.7rem;
    }
    
    .role-badge {
        font-size: 0.7rem;
        padding: 0.125rem 0.25rem;
    }
    
    .btn-add-user {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 576px) {
    .users-table th:nth-child(5),
    .users-table td:nth-child(5) {
        display: none; /* Ocultar teléfono en móviles muy pequeños */
    }
    
    .users-table th:nth-child(7),
    .users-table td:nth-child(7) {
        display: none; /* Ocultar organismo en móviles muy pequeños */
    }
}
