<?php $__env->startSection('content'); ?>
<style>
/* Colores personalizados basados en Blulinc */
:root {
    --blulinc-black: #000000;
    --blulinc-blue: #015cff;
    --blulinc-gray: #c1c1c1;
    --blulinc-light-gray: #f8f9fa;
    --blulinc-light-blue: #e6f2ff;
    --blulinc-bg-blue: #f0f7ff;
}

body {
    background-color: var(--blulinc-bg-blue) !important;
}

.blulinc-container {
    max-width: 1200px; /* Limitar ancho máximo */
    margin: 0 auto;
    padding: 24px 20px; /* Reducido */
    min-height: 100vh;
    width: 95%; /* Ancho responsivo base */
}

.blulinc-header {
    background: linear-gradient(135deg, #015cff 0%, #0146cc 100%);
    color: white;
    margin-bottom: 24px;
    padding: 20px 24px;
    border-radius: 12px;
    text-align: center;
    font-size: 28px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(1, 92, 255, 0.3);
}

.blulinc-header h1 {
    color: white; /* Cambiado de negro a blanco */
    background: linear-gradient(135deg, #ffffff 0%, #87ceeb 100%); /* Degradado blanco a azul cielo sutil */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-size: 28px; /* Reducido */
    margin: 0;
}

.blulinc-main-content {
    max-width: 1200px; /* Limitar ancho máximo */
    margin: 0 auto; /* Centrar contenido */
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(1, 92, 255, 0.1);
    overflow: hidden;
    border: 1px solid #e1ecf7;
}

.blulinc-table-container {
    background: white;
    border-radius: 12px;
    overflow-x: auto;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.blulinc-table {
    margin-bottom: 0;
    border: none;
    width: 100%;
    table-layout: fixed;
    min-width: 800px; /* Ancho mínimo para mantener formato */
}

.blulinc-table thead th {
    background-color: #f8f9fa;
    color: var(--blulinc-black);
    font-weight: 600;
    font-size: 12.48px; /* 4% más grande que 12px */
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border: none;
    padding: 12px 10px;
    border-bottom: 2px solid #e9ecef;
    text-align: center;
    vertical-align: middle;
}

.blulinc-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}

.blulinc-table tbody tr:hover {
    background-color: #fafbfd;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(1, 92, 255, 0.08);
}

.blulinc-table tbody td {
    padding: 12px 10px;
    color: var(--blulinc-black);
    font-size: 13.52px; /* 4% más grande que 13px */
    font-weight: 500;
    border: none;
    vertical-align: middle;
    text-align: center;
    border-bottom: 1px solid #f1f3f4;
}

.blulinc-btn-primary {
    background: linear-gradient(135deg, var(--blulinc-blue) 0%, #0147d9 100%);
    border: none;
    color: white;
    border-radius: 10px;
    font-weight: 600;
    padding: 12px 24px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(1, 92, 255, 0.25);
    text-decoration: none;
    display: inline-block;
}

.blulinc-btn-primary:hover {
    background: linear-gradient(135deg, #0147d9 0%, #0133b8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(1, 92, 255, 0.35);
    color: white;
    text-decoration: none;
}

.blulinc-btn-sm, .blulinc-btn-danger {
    padding: 6px 12px;
    font-size: 11px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
}

.blulinc-btn-sm {
    background: linear-gradient(135deg, #015cff 0%, #0146cc 100%);
    color: white;
}

.blulinc-btn-sm:hover {
    background: linear-gradient(135deg, #0146cc 0%, #013299 100%);
    transform: translateY(-1px);
}

.blulinc-btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.blulinc-btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-1px);
}

.blulinc-id-column {
    color: var(--blulinc-blue);
    font-weight: 700;
    font-size: 15px;
}

.blulinc-badge-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.blulinc-badge-danger {
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.button-group {
    display: flex;
    gap: 6px;
    justify-content: center;
}

/* === MEDIA QUERIES PARA RESPONSIVIDAD === */

/* Pantallas muy grandes (1920px+) */
@media (min-width: 1920px) {
    .blulinc-container {
        max-width: 1400px;
        padding: 28px 24px;
    }
    .blulinc-header {
        font-size: 32px;
        padding: 24px 28px;
    }
    .blulinc-table-container {
        padding: 24px;
    }
    .blulinc-table thead th {
        font-size: 13px;
        padding: 14px 12px;
    }
    .blulinc-table tbody td {
        font-size: 14px;
        padding: 14px 12px;
    }
    .blulinc-btn-sm, .blulinc-btn-danger {
        padding: 8px 16px;
        font-size: 12px;
    }
}

/* Pantallas grandes (1400px - 1919px) */
@media (max-width: 1919px) and (min-width: 1400px) {
    .blulinc-container {
        max-width: 1200px;
        width: 95%;
    }
}

/* Pantallas medianas-grandes (1200px - 1399px) */
@media (max-width: 1399px) and (min-width: 1200px) {
    .blulinc-container {
        max-width: 1100px;
        width: 95%;
        padding: 20px 15px;
    }
    .blulinc-header {
        font-size: 26px;
        padding: 18px 20px;
    }
    .blulinc-table-container {
        padding: 18px;
    }
}

/* Pantallas medianas (992px - 1199px) */
@media (max-width: 1199px) and (min-width: 992px) {
    .blulinc-container {
        max-width: 1000px;
        width: 95%;
        padding: 20px 10px;
    }
    .blulinc-header {
        font-size: 24px;
        padding: 16px 18px;
    }
    .blulinc-table-container {
        padding: 15px;
    }
    .blulinc-table {
        min-width: 700px;
    }
    .blulinc-table thead th {
        font-size: 11px;
        padding: 10px 8px;
    }
    .blulinc-table tbody td {
        font-size: 12px;
        padding: 10px 8px;
    }
    .blulinc-btn-sm, .blulinc-btn-danger {
        padding: 5px 10px;
        font-size: 10px;
    }
}

/* Pantallas pequeñas-medianas (768px - 991px) */
@media (max-width: 991px) and (min-width: 768px) {
    .blulinc-container {
        width: 98%;
        padding: 15px 8px;
    }
    .blulinc-header {
        font-size: 22px;
        padding: 14px 16px;
        margin-bottom: 20px;
    }
    .blulinc-table-container {
        padding: 12px;
        overflow-x: auto;
    }
    .blulinc-table {
        min-width: 600px;
    }
    .blulinc-table thead th {
        font-size: 10px;
        padding: 8px 6px;
    }
    .blulinc-table tbody td {
        font-size: 11px;
        padding: 8px 6px;
    }
    .blulinc-btn-sm, .blulinc-btn-danger {
        padding: 4px 8px;
        font-size: 9px;
    }
    .button-group {
        gap: 4px;
    }
}

/* Pantallas pequeñas (576px - 767px) */
@media (max-width: 767px) and (min-width: 576px) {
    .blulinc-container {
        width: 99%;
        padding: 10px 5px;
    }
    .blulinc-header {
        font-size: 20px;
        padding: 12px 14px;
        margin-bottom: 16px;
        border-radius: 8px;
    }
    .blulinc-table-container {
        padding: 8px;
        overflow-x: auto;
        border-radius: 8px;
    }
    .blulinc-table {
        min-width: 500px;
    }
    .blulinc-table thead th {
        font-size: 9px;
        padding: 6px 4px;
        letter-spacing: 0.3px;
    }
    .blulinc-table tbody td {
        font-size: 10px;
        padding: 6px 4px;
    }
    .blulinc-btn-sm, .blulinc-btn-danger {
        padding: 3px 6px;
        font-size: 8px;
    }
    .button-group {
        gap: 3px;
    }
}

/* Pantallas muy pequeñas (hasta 575px) */
@media (max-width: 575px) {
    .blulinc-container {
        width: 100%;
        padding: 8px 2px;
    }
    .blulinc-header {
        font-size: 18px;
        padding: 10px 12px;
        margin-bottom: 12px;
        border-radius: 6px;
    }
    .blulinc-table-container {
        padding: 5px;
        overflow-x: auto;
        border-radius: 6px;
    }
    .blulinc-table {
        min-width: 450px;
    }
    .blulinc-table thead th {
        font-size: 8px;
        padding: 4px 3px;
        letter-spacing: 0.2px;
    }
    .blulinc-table tbody td {
        font-size: 9px;
        padding: 4px 3px;
    }
    .blulinc-btn-sm, .blulinc-btn-danger {
        padding: 2px 4px;
        font-size: 7px;
    }
    .button-group {
        gap: 2px;
    }
}

/* Responsividad del container principal */
@media (min-width: 1920px) {
    .blulinc-container {
        max-width: 1400px;
        padding: 28px 24px;
    }
}

@media (max-width: 1199px) and (min-width: 992px) {
    .blulinc-container {
        padding: 20px 10px;
    }
}

@media (max-width: 991px) and (min-width: 768px) {
    .blulinc-container {
        padding: 15px 8px;
        width: 98%;
    }
}

@media (max-width: 767px) and (min-width: 576px) {
    .blulinc-container {
        padding: 10px 5px;
        width: 99%;
    }
}

@media (max-width: 575px) {
    .blulinc-container {
        padding: 8px 2px;
        width: 100%;
    }
}

    .blulinc-btn-create {
        background: white;
        border: 2px solid #6c757d;
        color: #495057;
        padding: 8px 16px; /* Tamaño mediano */
        font-size: 14px; /* Tamaño mediano */
        border-radius: 8px; /* Más redondeado para mediano */
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        transition: all 0.3s ease;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        gap: 8px; /* Gap mediano */
    }

    .blulinc-btn-create:hover {
        background: #f8f9fa;
        border-color: #495057;
        color: #343a40;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3); /* Sombra más prominente */
        text-decoration: none;
    }

    /* Media queries específicas para el botón Create - tamaño mediano */
    @media (max-width: 991px) {
        .blulinc-btn-create {
            padding: 7px 14px;
            font-size: 13px;
        }
    }

    @media (max-width: 767px) {
        .blulinc-btn-create {
            padding: 6px 12px;
            font-size: 12px;
        }
    }

    @media (max-width: 575px) {
        .blulinc-btn-create {
            padding: 5px 10px;
            font-size: 11px;
        }
    }
</style>

<div class="blulinc-container">
    <div class="blulinc-header d-flex justify-content-between align-items-center">
        <h1>User Management</h1>
                        <a href="<?php echo e(route('user-management.create')); ?>" class="blulinc-btn-create">
                    <i class="bi bi-plus-circle me-2"></i>Create New User
                </a>
    </div>
    
    <div class="blulinc-main-content">
        <div class="blulinc-table-container">
            <table class="table blulinc-table">
                <thead>
                    <tr>
                        <th>ID</th>
                        <th>NAME</th>
                        <th>EMAIL</th>
                        <th>ROLE</th>
                        <th>ACTIVE</th>
                        <th>ACTIONS</th>
                    </tr>
                </thead>
                <tbody>
                    <?php $__empty_1 = true; $__currentLoopData = $users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                        <tr>
                            <td class="blulinc-id-column"><?php echo e($user->id); ?></td>
                            <td><?php echo e($user->name); ?></td>
                            <td><?php echo e($user->email); ?></td>
                            <td><?php echo e($user->roles->first()->name ?? '-'); ?></td>
                            <td>
                                <?php if($user->is_active): ?>
                                    <span class="blulinc-badge-success">Yes</span>
                                <?php else: ?>
                                    <span class="blulinc-badge-danger">No</span>
                                <?php endif; ?>
                            </td>
                            <td>
                                <div class="button-group">
                                    <a href="<?php echo e(route('user-management.edit', $user->id)); ?>" class="blulinc-btn-primary blulinc-btn-sm">
                                        <i class="bi bi-pencil me-1"></i>Edit
                                    </a>
                                    <form action="<?php echo e(route('user-management.destroy', $user->id)); ?>" method="POST" style="display:inline-block">
                                        <?php echo csrf_field(); ?>
                                        <?php echo method_field('DELETE'); ?>
                                        <button type="submit" class="blulinc-btn-danger" onclick="return confirm('Are you sure you want to delete this user?')">
                                            <i class="bi bi-trash me-1"></i>Delete
                                        </button>
                                    </form>
                                </div>
                            </td>
                        </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                        <tr>
                            <td colspan="6" class="text-center py-5" style="color: var(--blulinc-gray); font-style: italic;">
                                No users found.
                            </td>
                        </tr>
                    <?php endif; ?>
                </tbody>
            </table>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?> 
<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/pixjucom/blulinc.pixju.com/resources/views/users/management.blade.php ENDPATH**/ ?>