#electrinet-admin-usuarios{

    max-width:1100px;

    margin:25px auto;

    padding:20px;

    background:#fff;

    border-radius:14px;

}

#electrinet-admin-usuarios h2{

    margin:0 0 20px;

}

#electrinet-admin-usuarios table{

    width:100%;

    border-collapse:collapse;

}

#electrinet-admin-usuarios thead tr{

    background:#06305B;

    color:#fff;

}

#electrinet-admin-usuarios th{

    padding:12px;

    text-align:left;

}

#electrinet-admin-usuarios td{

    padding:12px;

    border-bottom:1px solid #ececec;

}

.electrinet-role{

    width:100%;

    padding:8px;

}

.electrinet-save-btn{

    background:#EB6C00;

    color:#fff;

    border:none;

    padding:10px 18px;

    border-radius:8px;

    cursor:pointer;

    transition:.2s;

}

.electrinet-save-btn:hover{

    opacity:.9;

}

.eru-stats{
    display:grid;
    grid-template-columns:repeat(4, minmax(0, 1fr));
    gap:16px;
    margin:22px 0 30px;
}

.eru-stat-card{
    display:flex;
    align-items:center;
    gap:14px;
    padding:18px;
    background:#fff;
    border:1px solid #e3e8ef;
    border-radius:14px;
    box-shadow:0 8px 24px rgba(6,48,91,.08);
}

.eru-stat-icon{
    display:flex;
    align-items:center;
    justify-content:center;
    width:46px;
    height:46px;
    flex:0 0 46px;
    border-radius:12px;
    background:#f2f6fa;
    font-size:22px;
}

.eru-stat-card strong{
    display:block;
    margin-bottom:2px;
    color:#06305B;
    font-size:28px;
    line-height:1;
}

.eru-stat-card small{
    display:block;
    color:#667085;
    font-size:14px;
    font-weight:600;
}

.eru-list-title{
    margin:0 0 16px;
    color:#06305B;
    font-size:26px;
    line-height:1.2;
}

@media (max-width:900px){

    .eru-stats{
        grid-template-columns:repeat(2, minmax(0, 1fr));
    }

}

@media (max-width:560px){

    .eru-stats{
        grid-template-columns:1fr;
    }

    .eru-stat-card{
        padding:15px;
    }

    .eru-stat-card strong{
        font-size:24px;
    }

}

/* ==========================
   Tabla de usuarios
========================== */

#electrinet-admin-usuarios{
    max-width:1100px;
    margin:30px auto 0;
    padding:26px;
    background:#fff;
    border:1px solid #e3e8ef;
    border-radius:18px;
    box-shadow:0 12px 34px rgba(6,48,91,.08);
}

.electrinet-users-table-wrapper{
    width:100%;
    overflow-x:auto;
    border:1px solid #e3e8ef;
    border-radius:14px;
}

.electrinet-users-table{
    width:100%;
    min-width:820px;
    border-collapse:separate;
    border-spacing:0;
    background:#fff;
}

.electrinet-users-table thead{
    background:#06305B;
    color:#fff;
}

.electrinet-users-table th{
    padding:15px 16px;
    color:#fff;
    font-size:13px;
    font-weight:700;
    text-align:left;
    border:none;
}

.electrinet-users-table th:first-child{
    border-radius:13px 0 0 0;
}

.electrinet-users-table th:last-child{
    border-radius:0 13px 0 0;
}

.electrinet-users-table td{
    padding:14px 16px;
    color:#23364d;
    font-size:14px;
    vertical-align:middle;
    border:0;
    border-bottom:1px solid #edf1f5;
}

.electrinet-users-table tbody tr{
    transition:background .2s ease;
}

.electrinet-users-table tbody tr:hover{
    background:#f7f9fc;
}

.electrinet-users-table tbody tr:last-child td{
    border-bottom:none;
}

/* Selector de rol */

.electrinet-role{
    width:100%;
    min-height:44px;
    padding:8px 38px 8px 12px;
    color:#17324f;
    font-size:14px;
    font-weight:600;
    background:#fff;
    border:1px solid #ccd6e1;
    border-radius:9px;
    outline:none;
    cursor:pointer;
    transition:border-color .2s ease, box-shadow .2s ease;
}

.electrinet-role:focus{
    border-color:#06305B;
    box-shadow:0 0 0 3px rgba(6,48,91,.12);
}

/* Botón Guardar */

.electrinet-save-btn{
    min-width:94px;
    min-height:42px;
    padding:9px 17px;
    color:#fff;
    font-size:14px;
    font-weight:700;
    background:#EB6C00;
    border:1px solid #EB6C00;
    border-radius:9px;
    cursor:pointer;
    box-shadow:0 6px 14px rgba(235,108,0,.18);
    transition:transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.electrinet-save-btn:hover{
    color:#fff;
    background:#d85f00;
    border-color:#d85f00;
    box-shadow:0 8px 18px rgba(235,108,0,.26);
    transform:translateY(-1px);
}

.electrinet-save-btn:active{
    transform:translateY(0);
}

/* Responsive */

@media (max-width:700px){

    #electrinet-admin-usuarios{
        padding:18px;
        border-radius:14px;
    }

    .eru-list-title{
        font-size:23px;
    }

}

/* ==========================
   Ajuste general del módulo
========================== */

.eru-header,
.eru-toolbar,
.eru-stats,
#electrinet-admin-usuarios{
    width:100%;
    max-width:none;
    box-sizing:border-box;
}

/* ==========================
   Cabecera corporativa
========================== */

.eru-header{
    position:relative;
    overflow:hidden;
    margin-bottom:22px;
    padding:34px 38px;
    color:#fff;
    background:linear-gradient(135deg,#06305B 0%,#001d3d 100%);
    border-radius:20px;
    box-shadow:0 14px 34px rgba(6,48,91,.20);
}

.eru-header::after{
    content:"👥";
    position:absolute;
    right:34px;
    top:50%;
    transform:translateY(-50%);
    font-size:78px;
    line-height:1;
    opacity:.12;
}

.eru-header-info{
    position:relative;
    z-index:1;
}

.eru-badge{
    display:inline-block;
    margin-bottom:10px;
    padding:6px 11px;
    color:#fff;
    font-size:12px;
    font-weight:800;
    letter-spacing:.7px;
    background:rgba(255,255,255,.14);
    border:1px solid rgba(255,255,255,.24);
    border-radius:999px;
}

.eru-header h1{
    margin:0 0 10px;
    color:#fff;
    font-size:42px;
    line-height:1.08;
}

.eru-header p{
    margin:0;
    color:rgba(255,255,255,.82);
    font-size:15px;
}

/* ==========================
   Tabla al mismo ancho
   ========================== */

#electrinet-admin-usuarios{
    margin:30px 0 0;
    padding:26px;
}

.electrinet-users-table-wrapper{
    width:100%;
    box-sizing:border-box;
}

.electrinet-users-table{
    width:100%;
}

/* ==========================
   Responsive
========================== */

@media (max-width:700px){

    .eru-header{
        padding:26px 22px;
        border-radius:16px;
    }

    .eru-header h1{
        font-size:31px;
    }

    .eru-header::after{
        right:18px;
        font-size:58px;
    }

}

/* ==========================
   Cabecera final
========================== */

.eru-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:30px;
    min-height:210px;
    padding:34px 42px;
}

.eru-header-info{
    flex:1;
    min-width:0;
}

.eru-header h1,
.eru-header-info h1{
    margin:14px 0 10px !important;
    color:#fff !important;
    font-size:52px !important;
    font-weight:800 !important;
    line-height:1.05 !important;
    text-shadow:none !important;
}

.eru-header p,
.eru-header-info p{
    margin:0 !important;
    color:rgba(255,255,255,.88) !important;
    font-size:17px !important;
    line-height:1.5 !important;
}

.eru-badge{
    color:#fff !important;
    background:rgba(255,255,255,.14);
}

.eru-header-actions{
    position:relative;
    z-index:2;
    display:flex;
    flex:0 0 260px;
    align-items:center;
    justify-content:flex-end;
}

.eru-dashboard-btn{
    display:flex;
    align-items:center;
    justify-content:center;
    width:100%;
    min-height:50px;
    padding:12px 20px;
    box-sizing:border-box;
    color:#fff !important;
    font-size:15px;
    font-weight:800;
    font-style:italic;
    text-decoration:none !important;
    background:rgba(255,255,255,.12);
    border:1px solid rgba(255,255,255,.25);
    border-radius:8px;
    transition:background .2s ease, transform .2s ease;
}

.eru-dashboard-btn:hover{
    color:#fff !important;
    background:rgba(255,255,255,.20);
    transform:translateY(-1px);
}

.eru-header::after{
    right:310px;
}

/* Responsive */

@media (max-width:800px){

    .eru-header{
        align-items:flex-start;
        flex-direction:column;
        min-height:auto;
        padding:28px 24px;
    }

    .eru-header h1,
    .eru-header-info h1{
        font-size:36px !important;
    }

    .eru-header-actions{
        width:100%;
        flex:0 0 auto;
    }

    .eru-dashboard-btn{
        width:100%;
    }

    .eru-header::after{
        right:20px;
        top:35px;
        transform:none;
        font-size:52px;
    }

}

.electrinet-save-btn:disabled{
    cursor:wait;
    opacity:.72;
    transform:none;
}

/* ==========================
   Usuario y avatar
========================== */

.eru-user-cell{
    display:flex;
    align-items:center;
    gap:12px;
    min-width:210px;
}

.eru-user-avatar{
    width:42px;
    height:42px;
    flex:0 0 42px;
    overflow:hidden;
    background:#f2f6fa;
    border:2px solid #fff;
    border-radius:50%;
    box-shadow:0 3px 10px rgba(6,48,91,.14);
}

.eru-user-avatar img{
    display:block;
    width:100%;
    height:100%;
    object-fit:cover;
    border-radius:50%;
}

.eru-user-info{
    display:flex;
    flex-direction:column;
    min-width:0;
}

.eru-user-info strong{
    overflow:hidden;
    color:#17324f;
    font-size:14px;
    line-height:1.35;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.eru-user-info small{
    margin-top:3px;
    color:#8290a3;
    font-size:11px;
    font-weight:600;
}

/* ==========================
   Badge del rol
========================== */

.eru-role-wrapper{
    display:flex;
    flex-direction:column;
    gap:8px;
}

.eru-role-badge{
    display:inline-flex;
    align-items:center;
    align-self:flex-start;
    padding:4px 10px;
    border-radius:999px;
    background:#eef4fb;
    color:#06305B;
    font-size:11px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.5px;
}

/* ==========================
   Colores por rol
========================== */

.eru-role-admin{
    color:#166534;
    background:#dcfce7;
}

.eru-role-supervisor{
    color:#9a3412;
    background:#ffedd5;
}

.eru-role-empleado{
    color:#1d4ed8;
    background:#dbeafe;
}

.eru-role-cliente{
    color:#475569;
    background:#f1f5f9;
}

.eru-role-seo{
    color:#6b21a8;
    background:#f3e8ff;
}

.eru-role-default{
    color:#374151;
    background:#f3f4f6;
}

/* =========================================================
   BUSCADOR DE USUARIOS
   Mismo componente que Presupuestos
========================================================= */

.eru-search{
    display:flex;
    flex-direction:column;
    gap:7px;

    margin-bottom:22px;
}

.eru-search label{
    color:#06305B;
    font-size:12px;
    line-height:1.2;
    font-weight:700;
}

.eru-search #eruBuscarUsuario{

    display:block;

    width:100% !important;
    max-width:100% !important;

    min-height:62px;

    margin:0;
    padding:18px 20px;

    background:#ffffff !important;

    border:1px solid #e5e7eb !important;
    border-radius:6px !important;

    outline:none !important;

    color:#1f2937;

    font-family:Arial,sans-serif;
    font-size:17px !important;
    font-weight:500;

    box-shadow:0 12px 35px rgba(0,0,0,.08) !important;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;

    box-sizing:border-box;
}

.eru-search #eruBuscarUsuario::placeholder{
    color:#737373;
    opacity:1;
}

.eru-search #eruBuscarUsuario:focus{

    border-color:#06305B !important;

    box-shadow:
        0 0 0 2px rgba(6,48,91,.08),
        0 12px 35px rgba(0,0,0,.08) !important;
}

@media(max-width:480px){

    .eru-search #eruBuscarUsuario{

        min-height:56px;

        padding:16px;

        font-size:15px !important;
    }

}