/* ======================================
   ESTILOS COMUNES PARA TODA LA APLICACIÓN
   ====================================== */

body {
  font-family: "Roboto", sans-serif;
  margin: 0;
  padding: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ========== HEADER STYLES ========== */

header {
    padding: 28px;
    display: flex;
    justify-content: space-between;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    font-weight: 600;
    font-size: 18px;
    color: #333;
    line-height: 15px;
}

.header-logo {
    height: 32px;
    width: auto;
    color: #333;
    text-decoration: none;
}

.notificaciones-container {
    display: flex;
    gap: 4px;
    align-items: center;
    transition: opacity 0.3s ease;
    color: #414141;
    font-size: 19px;
    cursor: pointer;
}

.notificaciones-badge {
    background: #dc3545;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: bold;
    min-width: 18px;
    text-align: center;
}

.notificaciones-container.inactivo {
    opacity: 0.5;    
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    line-height: 1.2;
}

.user-role {
    font-size: 12px;
    color: #666;
    text-transform: capitalize;
    background: rgba(0, 51, 102, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    line-height: 1.2;
}

.user-menu {
    display: flex;
    align-items: center;
}

.logout-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.logout-link:hover {
    color: #003366;
    background: rgba(0, 51, 102, 0.1);
}

.logout-link i {
    font-size: 16px;
}

/* ========== LAYOUT PRINCIPAL ========== */

main {
    background-color: #f6f6f6;
    display: flex;
    flex: 1;
    overflow: hidden;
}

footer {
    background: #003366;
    color: white;
    padding: 1em;
    flex-shrink: 0;
    z-index: 100;
}

/* ========== SIDEBAR STYLES ========== */

sidebar {
    background: #fff;
    padding: 15px 10px;
    width: 45px;
    min-width: 45px;
    overflow: hidden;
    transition: width 0.4s ease;
    border-right: 1px solid #e0e0e0;
    flex-shrink: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

sidebar:hover {
    width: 280px;
}

sidebar ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

sidebar li {
    display: block;
    padding: 8px 0;
}

sidebar li a {
    display: flex;
    gap: 15px;
    align-items: center;
    color: #222;
    text-decoration: none;
    white-space: nowrap;
    padding: 12px 8px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

sidebar li a:hover {
    color: #353535;
    background-color: #f0f0f0;
}

sidebar li a i {
    min-width: 24px;
    text-align: center;
    font-size: 18px;
    flex-shrink: 0;
}

sidebar li a span {
    opacity: 0;
    transition: opacity 0.3s ease 0.15s;
    overflow: hidden;
    flex: 1;
}

sidebar:hover li a span {
    opacity: 1;
}

/* ========== DROPDOWN MENU STYLES ========== */

.menu-item-dropdown {
    position: relative;
}
.menu-item-dropdown span, .menu-item-dropdown i{
    color: #222;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.dropdown-arrow {
    transition: transform 0.3s ease;
    font-size: 12px;
    opacity: 0;
}

sidebar:hover .dropdown-arrow {
    opacity: 1;
}

.menu-item-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin: 0;
    padding: 0;
    list-style: none;
}

.menu-item-dropdown.active .submenu {
    max-height: 600px; /* Aumentado para acomodar más items */
    overflow-y: auto; /* Agregar scroll si es necesario */
}

.submenu li {
    margin: 0;
}

.submenu li a {
    padding: 12px 20px 12px 44px;
    font-size: 14px;
    color: #333;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.submenu li a:hover {
    background: #f0f0f0;
    border-left-color: #007bff;
    color: #007bff;
}

.submenu li a i {
    font-size: 16px;
    min-width: 20px;
}

/* ========== CONTENIDO PRINCIPAL ========== */

.contenido-principal {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px;
    min-width: 0;
    height: 100%;
}

.contenido-titulo {
    padding: 14px;
    margin: 14px;
    background-color: #fff;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contenido-titulo h2 {
    margin: 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.contenido {
    padding: 14px;
    margin: 14px;
}

/* ========== BOTONES COMUNES ========== */

.btn-lims-link {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: unset;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-lims-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
}

/* ========== FORMULARIOS COMUNES ========== */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-weight: 500;
    color: #333;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-label i {
    color: #003366;
    width: 16px;
}

.form-input {
    padding: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-family: "Roboto", sans-serif;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #fafafa;
}

.form-input:focus {
    outline: none;
    border-color: #003366;
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
    background: white;
}

/* ========== ESTADOS DE CARGA ========== */

.loading-spinner {
    text-align: center;
    padding: 40px;
    color: #007bff;
}

.loading-spinner i {
    font-size: 48px;
    margin-bottom: 20px;
    display: block;
}

.loading-spinner p {
    font-size: 16px;
    margin: 0;
}

/* ========== RESPONSIVE COMÚN ========== */

@media (max-width: 768px) {
    body {
        height: 100vh;
    }
    
    header {
        padding: 20px;
    }
    
    sidebar {
        width: 60px;
        min-width: 60px;
    }
    
    sidebar:hover {
        width: 250px;
    }
    
    .contenido-principal {
        padding: 10px;
    }
    
    .contenido-titulo {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* ========== STEPPER STYLES ========== */

.stepper-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    padding: 20px 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    min-width: 120px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.step-label {
    font-size: 12px;
    text-align: center;
    color: #666;
    font-weight: 500;
    transition: color 0.3s ease;
}

.step-connector {
    flex: 1;
    height: 2px;
    background: #e0e0e0;
    margin: 0 10px;
    margin-top: -20px;
    transition: background 0.3s ease;
}

/* Estados del stepper */
.step.active .step-number {
    background: #007bff;
    color: white;
}

.step.active .step-label {
    color: #007bff;
    font-weight: 600;
}

.step.completed .step-number {
    background: #28a745;
    color: white;
}

.step.completed .step-label {
    color: #28a745;
}

.step.completed + .step-connector {
    background: #28a745;
}

.step.active + .step-connector {
    background: linear-gradient(to right, #007bff 50%, #e0e0e0 50%);
}

/* Contenido del stepper */
.stepper-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-height: 400px;
    margin-bottom: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.step-content {
    display: none;
    padding: 40px;
    text-align: center;
    animation: fadeIn 0.3s ease-in-out;
}

.step-content.active {
    display: block;
}

.step-icon {
    font-size: 48px;
    color: #007bff;
    margin-bottom: 20px;
}

.step-content h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 24px;
    font-weight: 600;
}

.step-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.step-placeholder {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 60px 20px;
    margin: 20px auto;
    max-width: 500px;
    color: #6c757d;
}

.step-placeholder i {
    font-size: 36px;
    margin-bottom: 15px;
    display: block;
}

.step-placeholder p {
    margin: 0;
    font-weight: 500;
}

/* Navegación del stepper */
.stepper-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-stepper {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-previous {
    background: #6c757d;
    color: white;
}

.btn-previous:hover:not(:disabled) {
    background: #5a6268;
}

.btn-next {
    background: #007bff;
    color: white;
}

.btn-next:hover {
    background: #0056b3;
}

.btn-stepper:disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== ANALISIS LIMS STYLES ========== */

.btn-lims-link {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: unset;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-lims-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
}

.loading-spinner {
    text-align: center;
    padding: 40px;
    color: #007bff;
}

.loading-spinner i {
    font-size: 48px;
    margin-bottom: 20px;
    display: block;
}

.loading-spinner p {
    font-size: 16px;
    margin: 0;
}

.analisis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
}

.analisis-header h4 {
    margin: 0;
    color: #333;
    font-size: 20px;
}

.btn-volver {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s ease;
}

.btn-volver:hover {
    background: #5a6268;
}

.analisis-controles {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
}

.buscar-analisis {
    position: relative;
    flex: 1;
    max-width: 300px;
}

.buscar-analisis input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
}

.buscar-analisis i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.seleccion-controles {
    display: flex;
    gap: 10px;
}

.btn-seleccionar-todos,
.btn-deseleccionar-todos {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s ease;
}

.btn-seleccionar-todos:hover,
.btn-deseleccionar-todos:hover {
    background: #e9ecef;
}

.analisis-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin-bottom: 20px;
}

.analisis-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #f1f1f1;
    cursor: pointer;
    transition: background 0.2s ease;
}

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

.analisis-item:hover {
    background: #f8f9fa;
}

.analisis-item.selected {
    background: #e3f2fd;
    border-left: 3px solid #007bff;
}

.analisis-checkbox {
    margin-right: 12px;
    transform: scale(1.2);
}

.analisis-info {
    flex: 1;
}

.analisis-id {
    font-weight: 600;
    color: #007bff;
    font-size: 14px;
}

.analisis-nombre {
    color: #333;
    margin-top: 2px;
    font-size: 16px;
}

.analisis-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
}

.seleccionados-count {
    color: #6c757d;
    font-weight: 500;
}

.seleccionados-count span {
    color: #007bff;
    font-weight: 600;
}

.btn-confirmar-analisis {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

.btn-confirmar-analisis:hover:not(:disabled) {
    background: #218838;
}

.btn-confirmar-analisis:disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        height: 100vh;
    }
    
    header {
        padding: 20px;
    }
    
    sidebar {
        width: 60px;
        min-width: 60px;
    }
    
    sidebar:hover {
        width: 250px;
    }
    
    .stepper-header {
        flex-direction: column;
        gap: 20px;
        padding: 15px;
    }
    
    .step-connector {
        display: none;
    }
    
    .step {
        min-width: auto;
    }
    
    .step-content {
        padding: 20px;
    }
    
    .stepper-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn-stepper {
        width: 100%;
        justify-content: center;
    }
    
    .analisis-controles {
        flex-direction: column;
        align-items: stretch;
    }
    
    .buscar-analisis {
        max-width: none;
    }
    
    .analisis-footer {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .btn-confirmar-analisis {
        width: 100%;
    }
    
    .contenido-principal {
        padding: 10px;
    }
    
    /* Responsive para selección de equipo */
    .equipos-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .equipo-card {
        padding: 20px 15px;
    }
    
    .seleccion-info {
        flex-direction: column;
        gap: 10px;
    }
}

/* ======================================
   ESTILOS PARA LA PÁGINA DE LOGIN
   ====================================== */

.login-body {
    background: linear-gradient(135deg, #f6f6f6 0%, #e8e8e8 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    justify-content: center;
    gap: 35px;
}

.login-header {
    text-align: center;
    margin: 21px 0;
}

.login-logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.login-logo {
    height: 48px;
    width: auto;
}

.login-title {
    font-size: 28px;
    font-weight: 600;
    color: #003366;
    margin: 0;
}

.login-form-container {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.login-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 51, 102, 0.1);
    border: 1px solid rgba(0, 51, 102, 0.08);
    width: 100%;
    max-width: 400px;
}

.login-icon {
    text-align: center;
    margin-bottom: 24px;
}

.login-icon i {
    font-size: 48px;
    color: #003366;
    opacity: 0.8;
}

.login-subtitle {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.login-description {
    text-align: center;
    color: #666;
    margin: 0 0 32px 0;
    font-size: 14px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-weight: 500;
    color: #333;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-label i {
    color: #003366;
    width: 16px;
}

.form-input {
    padding: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-family: "Roboto", sans-serif;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #fafafa;
    width: 332px;
}

.form-input:focus {
    outline: none;
    border-color: #003366;
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
    background: white;
}

.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #003366;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    user-select: none;
}

.checkbox-container input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
    accent-color: #003366;
}

.forgot-password {
    color: #003366;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #0066cc;
    text-decoration: underline;
}

.login-button {
    background: #003366;
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    font-family: "Roboto", sans-serif;
}

.login-button:hover {
    background: #0066cc;
    transform: translateY(-1px);
}

.login-button:active {
    transform: translateY(0);
}

.login-error {
    background: #fee;
    color: #c33;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #fcc;
    margin-top: 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-error i {
    color: #c33;
}

.login-footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px 0;
    color: #666;
    font-size: 12px;
    border-top: 1px solid #e0e0e0;
}

/* Responsive para login */
@media (max-width: 768px) {
    .login-container {
        padding: 16px;
        min-height: 100vh;
    }
    
    .login-card {
        padding: 24px;
        border-radius: 12px;
    }
    
    .login-title {
        font-size: 24px;
    }
    
    .login-subtitle {
        font-size: 20px;
    }
    
    .form-input {
        padding: 14px;
        font-size: 16px;
    }
    
    .login-button {
        padding: 14px 20px;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 12px;
    }
    
    .login-card {
        padding: 20px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* =================================
   ESTILOS PARA GESTIÓN DE USUARIOS
   ================================= */

/* Título y acciones */
.titulo-acciones {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-primary {
    background: #007bff !important;
    border-color: #007bff !important;
}

.btn-primary:hover {
    background: #0056b3 !important;
    border-color: #0056b3 !important;
}

/* Controles de usuarios */
.usuarios-controles {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    gap: 20px;
    flex-wrap: wrap;
}

.buscar-usuarios {
    position: relative;
    min-width: 300px;
}

.buscar-usuarios input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.buscar-usuarios input:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.buscar-usuarios i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.filtros-usuarios {
    display: flex;
    gap: 12px;
    align-items: center;
}

.filtros-usuarios select {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    min-width: 140px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.filtros-usuarios select:focus {
    border-color: #007bff;
    outline: none;
}

/* Estado de carga */
.usuarios-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Lista de usuarios - Grid */
.usuarios-lista {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: opacity 0.3s ease;
}

.usuarios-grid-header {
    display: grid;
    grid-template-columns: 50px 80px 200px 1fr 120px 100px 100px;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    font-weight: 600;
    font-size: 14px;
    color: #495057;
}

.usuarios-grid-body {
    max-height: 600px;
    overflow-y: auto;
}

.usuarios-grid-row {
    display: grid;
    grid-template-columns: 50px 80px 200px 1fr 120px 100px 100px;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
    gap: 14px;
}

.usuarios-grid-row:hover {
    background-color: #f8f9fa;
}

.grid-header-cell,
.grid-cell {
    padding: 16px 12px;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.grid-header-cell {
    font-weight: 600;
    color: #495057;
    background: #f8f9fa;
}

/* Avatar */
.usuario-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.avatar-placeholder {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

/* Información del usuario */
.usuario-nombre {
    font-weight: 500;
    color: #333;
}

.usuario-email {
    color: #666;
    font-size: 13px;
}

/* Badges */
.rol-badge,
.estado-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    min-width: 80px;
}

/* Badges de rol */
.rol-admin {
    background: #dc3545;
    color: white;
}

.rol-analista {
    background: #007bff;
    color: white;
}

.rol-laboratorista {
    background: #28a745;
    color: white;
}

.rol-consultor {
    background: #ffc107;
    color: #212529;
}

/* Badges de estado */
.estado-activo {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.estado-inactivo {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Acciones */
.acciones-usuario {
    display: flex;
    gap: 8px;
}

.btn-accion {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 14px;
}

.btn-editar {
    background: #e3f2fd;
    color: #1976d2;
}

.btn-editar:hover {
    background: #bbdefb;
    color: #0d47a1;
}

.btn-eliminar {
    background: #ffebee;
    color: #d32f2f;
}

.btn-eliminar:hover {
    background: #ffcdd2;
    color: #b71c1c;
}

/* Paginación */
.usuarios-paginacion {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: white;
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 12px 12px;
    margin-top: 14px;
}

.paginacion-info {
    color: #666;
    font-size: 14px;
}

.paginacion-controles {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-paginacion {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-paginacion:not(:disabled):hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.btn-paginacion:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.paginacion-numeros {
    display: flex;
    gap: 4px;
    margin: 0 12px;
}

.btn-numero-pagina {
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-numero-pagina:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.btn-numero-pagina.activo {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.puntos-paginacion {
    display: flex;
    align-items: center;
    padding: 0 8px;
    color: #666;
    font-size: 14px;
}

.acciones-principales{
    display: flex;
    justify-content: flex-start;
    padding: 14px 14px 0;
    margin: 0 14px;
}

/* Responsive para usuarios */
@media (max-width: 1200px) {
    .usuarios-grid-header,
    .usuarios-grid-row {
        grid-template-columns: 50px 80px 1fr 180px 100px 90px 90px;
    }
}

@media (max-width: 992px) {
    .usuarios-controles {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .buscar-usuarios {
        min-width: auto;
    }
    
    .filtros-usuarios {
        justify-content: flex-start;
    }
    
    .usuarios-grid-header,
    .usuarios-grid-row {
        grid-template-columns: 50px 1fr 120px 100px 80px;
    }
    
    /* Ocultar columnas en móvil */
    .usuarios-grid-header .grid-header-cell:nth-child(2),
    .usuarios-grid-row .grid-cell:nth-child(2),
    .usuarios-grid-header .grid-header-cell:nth-child(4),
    .usuarios-grid-row .grid-cell:nth-child(4) {
        display: none;
    }
}

@media (max-width: 768px) {
    .titulo-acciones {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .usuarios-paginacion {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .paginacion-numeros {
        margin: 0;
    }
}