/* 
 * Users Mobile - Vista de Tarjetas "Ultra-Premium" 
 */

.user-cards-grid {
    display: none;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 10px;
}

@media (max-width: 1024px) {
    #system-users-table-view {
        display: none !important;
    }

    .user-cards-grid {
        display: grid !important;
    }
}

.user-card-mobile {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 18px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-card-mobile:active {
    transform: scale(0.97);
}

.user-card-mobile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--role-color, #64748b);
}

/* Cabecera */
.user-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-card-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-card-avatar {
    width: 44px;
    height: 44px;
    background: var(--role-gradient, linear-gradient(135deg, #64748b, #94a3b8));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.user-card-names {
    display: flex;
    flex-direction: column;
}

.user-card-username {
    font-weight: 800;
    font-size: 1.05rem;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-card-fullname {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}

/* Badges de Rol */
.role-badge-mobile {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--role-bg, #f1f5f9);
    color: var(--role-text, #64748b);
}

/* Body */
.user-card-body {
    background: rgba(248, 250, 252, 0.6);
    padding: 12px;
    border-radius: 12px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.user-card-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-label {
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
}

.detail-value {
    font-size: 0.85rem;
    color: #334155;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Footer Actions */
.user-card-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 4px;
}

.user-action-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    background: white;
    color: #64748b;
    transition: all 0.2s;
}

.user-action-btn:active {
    background: #f8fafc;
    transform: translateY(2px);
}

.user-action-btn.edit {
    color: #6366f1;
    background: #f5f3ff;
    border-color: #ddd6fe;
}

.user-action-btn.perms {
    color: #8b5cf6;
    background: #f5f3ff;
    border-color: #ddd6fe;
}

.user-action-btn.delete {
    color: #ef4444;
    background: #fef2f2;
    border-color: #fee2e2;
}

/* Colores Dinámicos por Rol */
.role-admin {
    --role-color: #8b5cf6;
    --role-gradient: linear-gradient(135deg, #8b5cf6, #6366f1);
    --role-bg: rgba(139, 92, 246, 0.1);
    --role-text: #7c3aed;
}

.role-cobrador,
.role-collector {
    --role-color: #10b981;
    --role-gradient: linear-gradient(135deg, #10b981, #059669);
    --role-bg: rgba(16, 185, 129, 0.1);
    --role-text: #059669;
}

.role-tecnico {
    --role-color: #f59e0b;
    --role-gradient: linear-gradient(135deg, #f59e0b, #d97706);
    --role-bg: rgba(245, 158, 11, 0.1);
    --role-text: #d97706;
}

.role-secretaria {
    --role-color: #0ea5e9;
    --role-gradient: linear-gradient(135deg, #0ea5e9, #0284c7);
    --role-bg: rgba(14, 165, 233, 0.1);
    --role-text: #0284c7;
}